The concept is pretty simple. Using Gravity Forms “Post Fields” you can create a form which generates a post when it is submitted. All you have to do is add the desired post fields to your form. When the form is submitted, Gravity Forms will check if any post fields exist on the form and if so, generate a fresh new post based on those post fields!
Before we get too much further into this, I’d really recommend checking out the basic Gravity Forms post creation demo. If you’re new to Gravity Forms this will give you a better idea of what to expect and some context for the rest of this tutorial.
Gravity Forms Post Features
This tutorial will cover each Post Field and some of the cool features each field has to offer. Here is a quick list of post-related functionality Gravity Forms can handle right out of the box:
- Set the Post Title
- Set the Post Body/Content
- Set the Post Excerpt
- Set the Post Category (GF v1.6.3 adds support for setting multiple categories!)
- Set Post Tags
- Upload Images to the Post Gallery
- Set the Featured Image (aka, “Post Thumbnail”)
- Create custom fields for the post
- Set the default Post Status (“Draft”, “Pending Review” or “Published”)
- Set the default Post Author
- Set the default Post Format (ie “Standard”, “Link”, “Gallery”, “Quote”, etc)
Not bad, huh? You can use this list to get more information on features that interest you OR if your thirst for Gravity Forms knowledge is simply unquenchable, I suggest reading from top to bottom.
1. Setting the Post Title
Adding a Post Title field to your form will allow the user submitting the form to specify the title of the post. The Post Title field is also where you will manage the default Post Status, Post Author and Post Format of the created post. We’ll go into each of those in more detail later.
One of the really neat features of the Post Title field is the ability to specify a “content template”. Enabling this option will allow you to use merge tags to populate the title with dynamic values. When might you want to do this? How about if you have a Post Category field on your form. When submitted, you want to append that selected category name before the submitted post title. Here’s how that might look:
2. Setting the Post Body/Content
Adding a Post Body field to your form will allow the user submitting the form to specify the content of the post. Like the Post Title field, this field also provides options for managing the default Post Status, Post Author and Post Format of the created post.
Also like the Post Title field, the Post Body field provides the option to create a content template. It is with the Post Body field that the content template can really shine! The most obvious (and arguably the most useful) benefit is being able to insert submitted Post Images along side the submitted post content. I’ve implemented this functionality in the demo here. Here is the actual configuration I’m using to achieve the effect:
You’ll notice I’m using a pretty fancy merge tag to display the medium sized featured image to the right of the post content. Don’t worry! You don’t have to learn all that merge tag syntax. When you select a Post Image field from the merge tag drop down, a new drop down will appear with a full list of size and alignment options!
3. Setting the Post Excerpt
Adding a Post Excerpt field to your form will allow the user submitting the form to specify the excerpt content. Like the Post Title and Post Body fields, you will be able to specify the Post Status and Post Author from this field.
4. Setting the Post Category
Adding a Post Category field to your form will allow the user submitting the form to specify which category their post should be filed in. The Post Category field not only allows you to specify which categories should be available in the field, it also provides an option to display the field as one of the following field types: Drop Down, Checkboxes, Radio Buttons, and Multi Select. Selecting “Checkboxes” or “Multi Select” will allow users to select multiple categories to file their post in! This is relatively new functionality available in GF v1.6.3.
Feel free to add multiple Post Category fields on the same form. Categories from different Post Category fields will be consolidated and applied when the post is created.
5. Setting the Post Tags
Adding a Post Tags field to your form will allow the user submitting the form to specify how their post should be tagged. Tagging is a good way to specify organizable key words and subjects that the post relates to. The Post Tags field provides the option to specify which field type the field should display as. Available field types are: Single Line Text, Drop Down, Multi Select, Checkboxes, and Radio Buttons. If using the “Single Line Text” field type, note that the expected format is a comma-delimited list of tags.
6. Uploading Images to the Post Gallery
Adding a Post Image field to your form will allow the user submitting the form to upload an image to the post gallery. You can include uploaded Post Images in the post content using the “content template” functionality. See the Post Body section above for more details.
The Post Image field also provides options for collecting image meta data. Checking any of the image meta data options will add an additional input to the Post Image field which can be filled in by the submitting user. This data is then stored with the Post Image.
7. Setting the Featured Image
You can specify a particular Post Image field to also be set as the Featured Image (aka Post Thumbnail) of the created post. Just select the “Set as Featured Image” option and Gravity Forms will work it’s magic when the post is created.
8. Creating Custom Fields
Adding a Post Custom Field will allow the user submitting the form to enter a value which will be stored in a custom field as part of the created post. Custom fields are a simple way to bind related data to a post. Here’s a real example of how the settings might be configured:
With the above configuration in mind, imagine that you’re accepting user-submitted events for a blog about your night life. The data and time of the event will be pretty important. Custom fields to the rescue! With Gravity Forms’ Post Custom Field, you can specify a custom field to which the field value (in this case, the date of the event) should be mapped.
The Post Custom Field can use a variety of different field types including all Standard Field types and most Advanced Field types. This flexible field will allow you to capture a wide range of values include regular text, dates, times, phone numbers, URLs, files and more!
9. Setting the Default Post Status
You can specify the default Post Status from the Post Title, Post Body and Post Excerpt fields. The available options are “Draft”, “Pending Review” or “Published”. A “draft” is a post that is not yet ready to be published. A post which is “Pending Review” is ready to be published pending a review by an administrator. A “published” post is live and viewable by visitors on your website.
Gravity Forms may not support it out of the box, but it’s actually quite easy to set the post status by a user-submitted field value. Here are two handy resources that demonstrate how!
10. Setting the Post Author
Like the Post Status, the default Post Author can be set from the Post Title, Post Body and Post Excerpt fields. You must select a user from the “Default Post Author” drop down; however, if you wish to assign the post author based on the logged in user submitting the form, just check the “User logged in user as author” option. Bare in mind, this option will only work if the user is logged in when submitting the form. Otherwise, the post author will default to the user selected in the drop down.
11. Set the Default Post Format
If you’re running a theme that supports Post Formats or if you’re using implementing them on your own theme, you’ll be happy to hear that Gravity Forms provides support for Post Formats out of the box. The Post Format can be specified on the Post Title and Post Body fields. All standard WordPress Post Formats are supported.
If you’d like some more information on post formats, I’d recommend checking out this walk-through.
That’s a fairly exhaustive overview of the post creation functionality. As you can see, Gravity Forms post creation functionality is very flexible and super powerful! If you have any questions, please share them with us in the comments.
Did this resource help you do something awesome with Gravity Forms?
Then you'll absolutely love Gravity Perks; a suite of 46+ essential add-ons for Gravity Forms with support you can count on.
Abby McQuillen says
Can you use this feature with the Basic plan?
Samuel Bassah says
The solution in this article doesn’t use any of our Perks. It’s possible with the Gravity Forms Post fields.
WP Guy says
Is it possible to have different fields like in an email form and then allow the data to be sent creating a pending post with the data in the order I like? I want people to be able to send me data and then I check/accept the posts but not just from one big content box like WP Forms.
Samuel Bassah says
I’m guessing you could use custom fields for the different fields you want to accept data from the user and then map those custom fields to custom fields within the post. You can then use these custom fields to create the Post and output them.
I hope this helps.
Hi – Thanks for this tutorial. I have a couple questions…
1- Can multiple Gravity Forms fields get added to the body of the post in an ordered way? Example: GF field: video URL GF field: A description about the video.
Post body: Line 1 video URL Line 2 A description …
2- Can you host Gravity Forms on one site and still have it create posts on another site? Maybe via email > post or Json or RSS?
Dario Space says
We already followed up on this via email, but I wanted to post this in the comment thread so other customers could see it.
Using merge tags on the Body you should be able to add multiple fields to the Advanced Post Creation Addon. About creating posts on another site, you should be able to do that using the Webhooks addon from Gravity Forms and the WordPress API. You would just need to authenticate your API request from Site A to the credentials on Site B.
Stephen Davis says
I have set up my custom post using PODS, then created a form using Gravity Forms and Gravity Wiz. Unfortunately, when I view the post, it doesn’t show all of the fields, including the category. Also when I click on a category in the sidebar, it can’t find posts with that category even though I have posts for the category.
Dario Space says
It should with PODS as long as Custom Post types created with the plugin are compatible with standard WordPress Custom Post Types. From your comment, no posts for the category seem to show even that you mention you’ve created posts.
That could be related to PODS configuration.
If you have an active Gravity Perks License, you can open a ticket with us via our support form, with your account email so that our developers can take a look into it.
Dan Greene says
Is this method in this post still valid or do you have to use the advanced post creation add on now. I’ve tried using the add on and the sanitizing it does won’t let me format the output the way I need it.
Samuel Bassah says
The method in the tutorial is still valid, but the Advanced Post Creation add-on is the more preferred way to create Post since it offers more features. You may want to check out this Gravity Forms doc on how to control when the submitted values are sanitized or not.
Adam Warner says
Hi all. I’m using the Advanced Post Creation Add-on and when creating the Post Creation (feed) and merge fields are being displayed in the Post Body fine. However, I tried to add some simple HTML there and it’s not allowed.
My goal was to style three single line text fields in the output and put each into a separate paragraph in order to have each on a separate line.
Do you have any tips on how to style content template output? I used to be able to use HTML, but we the advent of this new Advanced Post Creation as an Add-on, I’m lost on how to do it.
Samuel Bassah says
Gravity forms sanitize, field values for security sake and I am not really sure if there is a way around this. I found this hook but it doesn’t really work as expected for Post Creation feeds. You may want to get in touch with Gravity Forms Support to see if they can assist with this.
The links to the demos apart from the top one all lead to 404 pages and when submitting a test post on the top one and it says now view your post here it also leads to a 404. Do these methods still work?
Scott Buchmann says
Thanks for the heads up. I have fixed the broken links.
ITSP-ITO TECHSOL says
Is there a way to include the alt text for an image when it is uploaded?
Ryan Donovan says
Hello, Generally this could be included within the caption but this depends on how your theme has this setup. Check out the documentation here for metadata regarding images https://docs.gravityforms.com/post-image/#image-metadata.
Thanks for this. Delighted to find your site as I explore Gravity Forms’ possibilities.
One small question: does GF allow visitors to format text (bold, italic, etc) before submitting? I’ve looked at a few YouTube videos etc and none show what I’d have thought was an essential feature for certain kinds of text at least.
Many thanks again. Stay safe!
Samuel Bassah says
You can enable the option to use the Rich Text Editor under the Advanced Tab of the Post Body field to allow users to format text.
Question. Im using advanced post creation to create a custom post type when submitting a form. At the same time im redirection user to a second form where users can add more info if the want. Is it possible to update the post thats created on the first submission when the submit this second form?
Samuel Bassah says
Post Creation in Gravity Forms core doesn’t support updating existing posts. It will only create new ones. They have an outstanding feature request to add support for this in the Advanced Post Creation Add-On. As it stands right now, the only way to update an existing post with Gravity Forms is to custom code it into the gform_after_submission hook. They have an example of how to update a post after it has been created in the link below:
You can adapt that to accomplish what you’re going for. Do note that you’ll also need to add some conditional logic to the APC feed so that it doesn’t create a new post when editing. I would imagine this will likely also need some custom code.
If you need to hire a developer, we recommend Codeable.io.
BAKARE PAUL BERNARD says
If a form is edited and updated using gravity view, will the post also be updated… This is very important
Ryan Donovan says
Hello Bakare, If edited with GravityView here is a list of supported fields within GravityView that can be edited. Let us know if you have any other questions. 😃
Ho Chan says
May I ask what is the difference between Gravity Forms + Custom Post Types & Gravity Forms Advanced Post Creation Add-On?
Ryan Donovan says
Hello, The https://wordpress.org/plugins/gravity-forms-custom-post-types/ plugin is something that we created but was ultimately surpassed by the full functionality of the Advanced Post Creation Add-On. We’re actually phasing out support for GF + CPT in favor of Gravity Forms’ Advanced Post Creation add-on (APC). The intent is to deprecate GF + CPT, which is why we advise our customers to use the Gravity Forms Advanced Post Creation Add-On. Have a great one!
Cathy Burr says
I’m more than happy to discover this site. I want to to thank you for your time for this particularly wonderful read!! I definitely enjoyed every bit of it and i also have you bookmarked to look at new things in your website.