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

    Using AJAX to conditionally submit form and using conditional logic to redirect user to thank you page

    Asked by Dave Bialac  on May 12, 2015 at 11:46 AM

    The client's form needs to, based on the result of the AJAX call, conditionally submit to one submission point or another. Can you platform support this kind of custom coding? If so, how?

  • Profile Image
    JotForm Support

    Answered by BJoanna on May 12, 2015 at 01:33 PM

    You can use AJAX code to conditionally submit form to one submission point or other but then you will need to get full source code of your JotForm form and apply AJAX on it.  That would require you to make the changes to your JotForm code - and re-do them each time you make some change to your JotForm within JotForm Builder.

    Instead of that you can use JotForm conditional logic. Conditional logic will show you one custom page after submission if one condition is satisfied or show you some other custom page if some other condition is satisfied. 


    In this specific case you can use Change Thank You Message after submission or  Change Thank You URL after submission.

    Here is demo form I made.



    Choosing Option 1 will redirect you to Thank you message and choosing Option 2 will redirect you to custom Thank you URL (in this case google.com)

    You can clone my demo form.

    Hope this will help. Let us know if you need further assistance.