If you’re using the Gravity Forms Advanced Post Creation add-on to create user-generated content and you want the user to be redirected to the post they just created when submitting the form, you’ll love this simple approach.
And did I mention, there is no code required!
The Fix
We’re going to be using a confirmation redirect and the {post_id} merge tag.
I’m going to assume you have the Advanced Post Creation feed setup already, so I’m not going to cover that here.
Step 1: The Confirmation
You can either use the Default confirmation or set up a custom confirmation. In this tutorial, we’ll be using the default confirmation.
Note: If you use a custom confirmation, you’ll need to configure the conditional logic so that the confirmation is triggered.
- Switch the Confirmation Type from Text to Redirect
- Add your site root domain to the Redirect URL field (i.e https://gravityranger.com/)
- Add p={post_id} to the Pass Field Data via Query String field
- Click Save Confirmation
It should look like this:
Step 2: Testing
It is important to make sure that this is working as expected. To test, simply open your form in Preview from within the form editor, fill out the fields, and click submit.
You should be redirected to the new post that was just created.
Need More Help?
If you have an active Gravity Forms license, you can also open a support ticket here.
If you still need help and Gravity Forms support isn’t an option, feel free to use the comments or chat options below.