PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Redirected to page create after form submission (Post features)

  1. enclave
    Member

    I was wondering if it is possible for us to redirect the user to the page created after form submission? Or at least display the URL - that would be good enough.

    Considering I'm allowing the page to be published soon after the user hit the submit button (or payment successful via PayPal)

    Posted 13 years ago on Monday August 22, 2011 | Permalink
  2. You can do this in two different ways.

    1. If you want to redirect directly to the published post, check the "Redirect" button on Confirmation tab of your "Form Settings". For the URL, put your site's URL (http://www.example.com/ or http://www.example.com/wp/ or whatever the WordPress root is.) Then, click the box "Pass Field Data Via Query String" and enter this:
      p={post_id}

      The post_id is available in the "Insert form field" drop down, but just inserting that won't get you much. You need the "p=" at the beginning.

      Screenshot: http://minus.com/m0DpMshm7

      Now, after form submission, the visitor will be redirected to that URL, and they won't even see the p=anything since WordPress will change the URL based on your permalink settings. This will work fine if you are publishing the post. If you make it a draft or pending, I don't think the post will be public so it won't come up unless you're logged in with permissions.

    2. If you want to display it in the confirmation settings, select a Text confirmation, and add this to your confirmation message:
      <a href="http://www.example.com/?p={post_id}">Here's your story</a>

      The key here again is the merge tag of [post_id}. That will display a link to the post. Your text confirmation might be

      [html]
      "Thanks for submitting your post.  You can view it <a href="http://www.example.com/?p={post_id}">here</a>."

    I think one of those two will work for you.

    Posted 13 years ago on Monday August 22, 2011 | Permalink
  3. enclave
    Member

    Brilliant. This is very useful indeed. We'll let you know how it goes. We're creating bunch of awesome stuff based on Gravity Forms.

    Posted 13 years ago on Monday August 22, 2011 | Permalink
  4. Glad you find it useful. We'd love to see what you're creating when it's done. If you need any more help, please let us know.

    Posted 13 years ago on Monday August 22, 2011 | Permalink

This topic has been resolved and has been closed to new replies.