What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Thank-you page redirect

    Asked by fooorex on January 09, 2012 at 03:58 AM

    I'm seeking a simple way to redirect users after form filling to a page like:

    http://www.domain.com/{formdata}/page.htm

    I tried with custom redirect and by putting meta refresh and javacript redirect in the thank you page but with no luck.

    Thanks a lot!

    Mario

  • Profile Image

    Answered by allanftd on January 09, 2012 at 06:16 AM

    Hi Mario,

    Yes you can redirect your guest after he submits the form to any webpage of your choice. Plese refer to this tutorial for a step by step guide:

    http://www.jotform.com/help/38-How-to-Redirect-to-a-Page-After-Form-Submission

  • Profile Image

    Answered by fooorex on January 09, 2012 at 06:49 AM

    Thank you Allanftd, i tried to put the {formdata} variable in the custom url but it seems that it not write the imput into the link

  • Profile Image

    Answered by fxr on January 09, 2012 at 07:06 AM

    You are unable to put the form variables in the custom URL. 

    Roughly, what is it you are trying to do with that variable in the URL? and we can have a think about what other options may be open to you. 

  • Profile Image

    Answered by fooorex on January 09, 2012 at 07:19 AM

    I would like to send the user who fill the form to his reffer page.

    For example, if he fill the referrer field with for instance: X111 after filling the form he should be redirected to something like: http://website/X111/page.htm

    I tried to do it with a redirect in the thank you page but the editor seems to erase bot meta refresh and javascript redirect

  • Profile Image

    Answered by fxr on January 09, 2012 at 07:40 AM

    An option is to do the redirect with php. 

    Here you would use a Custom URL for your thankyou page, enable POST Data on your form, then work out the post variable for the what I assume is a referrer field on the form (using    print_r($_POST); )

    This guide should help a lot as your work through that process: 

    http://www.jotform.com/help/51-How-to-Post-Submission-Data-to-Thank-You-Page

    Then on Custom URL which would be a php page, you just need to add some php redirect code such as to redirect to correct page:

    <?php

    $referer = "X111"; // change what the post variable name of your 

                       // referer field is eg $referer = $_POST['referer21'];

    /* Redirect browser */

    header("Location: http://website/$referer/page.htm");

    /* Make sure that code below does not get executed when we redirect. */

    exit;

    ?>

     

    This may be a bit of leap for you, but it is a relatively straightforward process and should work well. 

    If you are having any difficulty at all working out how to implement it, let us know where and we will do our best help you out. 

  • Profile Image

    Answered by fooorex on January 09, 2012 at 08:44 AM

    Thanks a lot i try right now!

  • Profile Image

    Answered by fooorex on January 09, 2012 at 09:02 AM

    Sorry i can't make it work, how it would be the php code if my variable field is: {codiceReferente} ?

  • Profile Image

    Answered by fooorex on January 09, 2012 at 09:13 AM

    I make like this:


    $referer = $_POST['codiceReferente']; // change what the post variable name of your

                       // referer field is eg $referer = $_POST['referer21'];

    /* Redirect browser */

    header("Location: http://website/$referer/page.htm");

    /* Make sure that code below does not get executed when we redirect. */

    exit;

    ?>

    With this result:

    http://form.jotform.com/form/20082345180

  • Profile Image

    Answered by fxr on January 09, 2012 at 09:16 AM

    Yes, that looks about right, just change :

    $referer = $_POST['codiceReferente'];

    to

     $referer = $_POST['codicereferente'];

     

    You also have a condition on your form, thats why its not redirecting to your php page, delete the condition. 

  • Profile Image

    Answered by fooorex on January 09, 2012 at 09:21 AM

    Right i forgot that condition! Sorry!

    Now it works perfectly! Thanks a lot!

  • Profile Image