Using Gravity Forms Advanced Post Creation add-on in a workflow
The Gravity Forms Advanced Post Creation (APC) add-on allows you to automate the publication of user-submitted content. It supports generating a traditional blog post, a business listing page or any other custom post type driven content where you also want to set taxonomies, custom fields, or include images/files into the body from the media library. Combining that functionality with a versatile Gravity Flow workflow can provide you with the ability to easily accept, verify, edit and publish content without requiring any user to access the admin dashboard of your site.
This user guide will show you how to build a workflow for a form that is setup with APC to:
- Let anyone with an email address submit content for your site through a form.
- Use an Create Post step to prepare a draft post including featured image.
- Use Approval and User Input steps to enable you to review and request changes by the submitter.
- If payment to/from the submitter were required before posting you could add a Stripe Capture Payment step during the workflow.
- Use an Update Post step to change the post status and have the post content revised based on the new values from the form entry.
- Use a Notification step to inform the submitter that their entry has been published.
Before following the rest of this user guide, we recommend you have followed the set up guide Gravity Forms provides for installion and activation of Advanced Post Creation Add-On.
Create a Form
For our workflow to generate content we need a Form and APC feed setup. If you already have one in mind, compare it to the fields/settings below which is the form used in the rest of this user guide.
If you would prefer to jump straight to workflow setup, you can:
- Download the pre-built Community Post Form (No Workflow)
- Unzip the file on your computer.
- Import the form via the Forms > Import/Export section in your admin dashboard ( guide)
The APC add-on also allows you to use multiple field types to provide taxonomies, custom fields or other post data which we will not cover in this guide. Refer to the APC instructions for more details on this. Your form should look like this when populated with entertaining test data
Create the FeedBefore the Advanced Post Creation steps can be added to the workflow, you will first need to create a feed. A feed simply allows form submission data to be sent to another source. In this instance, form data being sent will create the post, page or custom post type you define. Again, Gravity Forms has a detailed guide on creating an APC feeds to check out if you are not familiar with feed creation or how to use the rest of the settings available in it. Do the following when logged into your WordPress admin dashboard with a role that can edit forms:
NOTE: If you use the merge tag for a discussion field in the feed, it will not contain the view more/less functionality from within the Gravity Flow pages. You would need to add markup with an onClick event to show/hide more than a set number of discussion items. The selector to use in that scenario would be akin to Add the Create Post StepWe are now ready to start building a workflow that ensures the entry will cycle through our reviews, edits and potentially even payment steps notifying each assignee along the way.
|
Add an approval loop
You can create an approval loop, which will allow approvers to send the entry back to the submitter (email field) to change values on the form again. This is covered in good detail in our Configuring an Approval Process user guide. The important points for our step settings are:
- Create a User Input Step and save the following settings changes from the defaults:
- Step Name = Revisions Required
- Step Type = User Input
- Assignee(s) = The one Email field in our form
- Select all fields to be Editable Fields
- Note: We do not need to setup an assignee email because the the approval step has a 'Revert to User Input' notification that we will setup instead.
- Update the Confirmation Message "Thank you. We will review your proposed changes and let you know if it is ready to be published"
- Create an Approval Step and save the following settings changes from the defaults:
- Step Name = Review Community Post
- Step Type = Approval
- Assignee(s) = Whatever user/role is appropriate for your site to be reviewing content before it gets published.
- Revert to User Input step = Enabled and select the 'Revisions Required' step.
- Workflow Note = Required if reverted or rejected.
- Activate the Rejection Email
- Select the one Email field in our form to be the recipient of our message
- Include the {workflow_note} merge tag in the message so the user knows why their content is not being published.
- Activate the Revert Email
- Select the one Email field in our form to be the recipient of our message
- Include the {workflow_entry_link} merge tag in the message so the user can access the entry to edit and the {workflow_note} so they understand what changes we are expecting them to make.
{workflow_entry_link:text="Your entry is almost ready for publishing. Please revise your entry based on our editors feedback"}<br>{workflow_note}
To have the approval loop work exactly like we want, there is one small changes we need to make to the Create Post step we started with.
- From the Settings > Workflow menu select to edit the 'Prepare Draft Post' step.
- At the bottom of its' settings change the Next Step be the 'Review Community Post' approval step we setup.
- Save the settings
This ensures that the User Input step will only be part of the workflow when the approval assignee choses to revert to it.
We're ready to update and publish our post. But first...
Do you want to charge (or pay) for published content?
This would be a great spot in the workflow to add a Stripe-based capture payment step.
Add an Update Post Step
- Hover over Settings and click on Workflow
- Click Add New to create a new step.
- Give the step a name - Publish Post.
- Select Update Post from the Step Type list
- From the list of Feeds select the same Generate Post checkbox we did earlier for the Create Post step type.
- Change the Post Status to 'Published'
- Press the Update Step Settings button.
When the workflow reaches this step in the workflow, it will read in the latest field values from the entry and update the post content and any other settings the APC feed has defined.
Add a Notification Step
- Hover over Settings and click on Workflow
- Click Add New to create a new step
- Give the step a name - Inform Submitter
- Enable the Workflow notification
- Select the one Email field in our form to be the recipient of our message
- Populate an appropriate subject and message related to the post.
- Press the Update Step Settings button
The result is a workflow that will keep your content creation flowing with ease.
And the timeline for the entry showing when each feed or step was actioned.