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.

Variable redirect in confirmation message

  1. Hello,

    Is it possible for a submitted form to redirect the user based on the contents of that form? For example, if the user is from Canada or Mexico, I would like her to be directed to a page for our international clients that is unique from users who indicate a United States address.

    If this is not an inbuilt feature, I'm guessing my approach will be similar to this:

    http://www.gravityhelp.com/forums/topic/enter-code-and-redirect-if-successful

    -Ken

    Posted 13 years ago on Friday March 25, 2011 | Permalink
  2. No, this isn't currently a feature HOWEVER it is on our feature list to be added in a future release.

    In order to do this now you'd have to build your own custom confirmation page redirect handler.

    - Create a PHP page that redirects based on a query string value passed to it
    - Edit your form
    - Edit Form Settings
    - Select Confirmation Tab
    - Select Redirect
    - Set the Redirect URL to go to your custom PHP page
    - Use the query string builder to pass data to the custom PHP page
    - Save your form

    So it can be done as a customization. We do plan on adding this as a native feature in a future release.

    Posted 13 years ago on Friday March 25, 2011 | Permalink
  3. Thanks! I got this working pretty easily -- once I realized the redirect code had to go in its own PHP file and not in a WordPress post. :-)

    Posted 13 years ago on Friday March 25, 2011 | Permalink
  4. Good to hear! Yes, it would go in a standalone PHP file since it simply handles the redirect, it's just a go between page.

    Posted 13 years ago on Saturday March 26, 2011 | Permalink

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