Can I have a form redirect back to the page it was embedded on?

  • Profile Image
    Rick Pfahl
    Asked on March 22, 2011 at 11:31 PM

    For example, I have the same form in a block on 2 different pages, if the form is submitted from page A, I want the user to land on page A after successful form completion, if the form is on page B, they should be redirected back to page B and so forth.

  • Profile Image
    allanftd
    Answered on March 23, 2011 at 05:11 AM

    Hi Rick,

    There are two ways that I can think of that will make this possible with JotForm. It would, however, depend on what type of information you collect from your visitor. I will describe the options below:

    A) Use the Conditions function.

    JotForm's Conditions function adds more flexibility in your forms. It allows your form to perform several actions depending on the answer or action of your visitor. Just like how you described your scenario. Especially helpful would be the "Change Thank You URL after submission" and "Change Thank You message after submission" option.

    To learn more about Conditions, please visit this page: http://www.jotform.com/help/57-Conditional-Logic-on-Forms

    B) Customize your Thank You Message.

    You can add a hyperlink to your Thank You Message that will lead your visitor back to the page where he came from. The form will manually bring your visitor back to the page by clicking a hyperlink to be brought back to the original page.

    This option  is easy to implement. Just go to your form and click "Thank You Page" under the Setup & Embed tab.

    Then choose Thank You Message and click Next

    Then customize the Thank You page as you wish. Do not forget to include the hyperlink that will bring your visitor back to the original page. The hyperlink should look like this:

    <a target="_blank" href="javascript: history.go(-2)">Back</a>

    where 2 is the number of pages you want your visitor to go back. You can change this depending on how your form and website is set up.

    I hope you will find these options helpful. Thank you for using JotForm!

    JOTFORM SUPPORT

  • Profile Image
    winnie 
    Answered on January 22, 2016 at 04:41 AM

    Hello,

     

    It looks like your thankyou form now strips all the javascript code. How do I redirect it back to the previous page now?

    Thanks for your help in advance~

  • Profile Image
    Kiran
    Answered on January 22, 2016 at 09:37 AM

    Your question is moved to a separate thread and shall be answered shortly.

    http://www.jotform.com/answers/753243

    Thank you!