Quantcast
Channel: gravity forms – Bionic Teaching
Viewing all articles
Browse latest Browse all 37

Gravity Forms to Events Calendar Pro

$
0
0

I did some work making Gravity Forms create Events Calendar events back in 2017. Things have gotten easier with the Gravity Forms Advanced Post Creation plugin. I used this on the Anti-Racism site and forgot to document it.

First set up your form so it gets you the data you need. You’ll need something like . . .

  • event title
  • start date
  • start time
  • end date
  • end time
  • description

I suggest using the date and time form fields to help people with their entries.

If the advanced post creation plugin is installed and active, you’ll have Settings > Post Creation visible associated with your form. We’ll choose to make one of those.

I’ll use this embarrassingly large screenshot to talk us through the pattern. I’ll stick with the major pieces but much of this may be self explanatory.

A screenshot of the advanced post creation dashboard with elements numbered 1 through 5.

Step 1 – set the post type

You’ll want to create an event. It’s available as a drop down option under custom post types. That’s handy.1

Step 2 – set the post status

In our case, we wanted to approve this before it went live so we chose to put the post in Pending but you have your normal WordPress post status options.

Steps 3 and 4 – set the title and description

This is just a typical Gravity Forms variable. {whatever:12}

Step 5 – set the custom fields

Now we need to plugin in the right data pattern in the right custom fields. You can see a good chunk of the available fields listed here. To see all the custom fields associated with the Events post type for sure you can do something like this.

The three I needed are . . _EventStartDate, _EventEndDate, and _EventURL. Again, I’m using typical Gravity Form merge fields to combine the date and time to create the values I need for those fields.


1 The real name for it is tribe_events which can get confusing if you’re coding this instead. You can see it in the URL when you select Events from the admin dashboard.


Viewing all articles
Browse latest Browse all 37

Trending Articles