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

  • Profile Image
    Dave Bialac 
    Asked 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
    BJoanna
    Answered 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. 

    http://www.jotform.com/help/57-Smart-Forms-Using-Conditional-Logic 

    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.

     

    http://form.jotformpro.com/form/51315052326949?

    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.