Recently while working on a WordPress membership site, we found a need to rely on user-submitted content by our members. Gravity Forms has become our choice for all user-submitted content however Custom Post Types support is not yet added into the core. Luckily, there is a third-party (free add-on) that lets us extend the power of Gravity Forms to Custom Post Types. In this article, we will show you how to add user-submitted content in Custom Post Types with Gravity Forms.
Note: this article assumes that you already know and have created Custom Post Type(s) to use.
In order for you to easily allow user submission and follow this tutorial, you MUST have Gravity Forms plugin installed. Next, you need to install Gravity Forms + Custom Post Types plugin as well.
Now create a New Form and add the Title field from post fields. You can name it whatever you like. Click on the Advanced tab where you will see a new checkbox added called Save As Post Type. Check that box and select the post type from the drop down.
Most likely, you will want to sort these submissions into some sort of structure by using Custom Taxonomies. That is fairly easy as well. Create either a drop-down field, checkbox field, or a radio-button field. Simply add all of your taxonomies there. Then click on the advanced tab where you will see a new checkboxed added called Populate with a Taxonomy. Select the taxonomy you want to associate with.
If your custom taxonomy is the same structure as tags where you want users to specify each item, then you can use the single text. You can add an enhanced UI feature, so the user can add all tags.
You can easily do this by adding a single line text field. Going to the advanced tab, click save to taxonomy. Then also enable the enhanced UI.
You can map any custom fields, body text, images etc with Gravity forms using the post field.
An example of the final form could look look like this:
We hope that this has given you a general idea of how to use Gravity Forms with Custom Post Types. Very soon, we will share a practical example of how we used this feature to create a local group listing.
Is it possible to save the custom post type as private? Looking for a workaround so that the author of the post and the admins are the only ones that see it on the site.
This was a good solution for awhile, unfortunately the “Gravity Forms + Custom Post Types” plugin is no longer being maintained.
Is there any way to identify a page that is already published on your website, and have Gravity Forms add a comment to that page by one of the fields?
Don’t think that is possible without modifying the core plugin code.
Did you ever share the practical example of this? I’d love to see. Thanks!
The example is practical. You mean a live demo? Then no, we didn’t share that. We had a gallery section which we used this same solution for, but the quality of submissions were very low, so we turned it off.
I was referring to the last sentence of your post (above) that says: “Very soon, we will share a practical example of how we used this feature to create a local group listing.”
Sorry to hear the quality of submissions was low!
I got this working on my site in the meantime and appreciate the response.
Ah, yeah. We built that for a client. Will see if we can get that post out. Completely forgot about that.