How can I prevent the Thank You page redirect after form submission?

  • RightScale
    Asked on January 19, 2016 at 4:52 PM

    Some background - we are embedding the Jotform form HTML (minus the submit button and CSS) inside of a modal dialog on our site. Instead of the form submit button, we are using the OK button in the modal dialog itself. After the user clicks the OK button, we want the form to submit to Jotform and the modal dialog to close.

    In order to accomplish the first task, we have set the modal OK button to trigger "document.forms['(Jotform form id)'].submit();" We do not want to use an iframe because we have our own CSS for the form elements, and the OK button we are using is part of the modal framework, not the form itself.

    Clicking on the modal's OK button successfully submits the form to Jotform, but then the user is redirected to a thank you page. Is there a way to totally disable this redirecting behavior?

    Thanks.

    Jotform Thread 749660 Screenshot
  • Aytekin JotForm Founder
    Replied on January 19, 2016 at 6:43 PM

    Unfortunately, this is not possible. You cannot add JavaScript code into the custom Thank You page, and redirect will also won't work for this since it will open within an iframe. 

    I think the best solution is to just give confirmation to user. Say something like "Your request has been received." Giving confirmations is also a good thing for the user experience. Without that the user might wonder if their click was successful or if something happened. 

  • RightScale
    Replied on January 19, 2016 at 6:51 PM

    Thank you for your response. Unfortunately, this will not work for our needs, as we do not want to redirect the user away from page they are on. One reason that we use the modal dialog is to allow the user to contact us from any page on the site and not lose their context. We do give the user notification that the message was sent, but through our site's asynchronous notification system. It seems that we will need to find another solution unless JotForm makes the redirect optional in the future.

  • Aytekin JotForm Founder
    Replied on January 19, 2016 at 8:01 PM

    Redirect is optional. Instead of redirecting, you can just show users a Thank You message. 

     

  • RightScale
    Replied on January 20, 2016 at 10:32 AM

    As far as I can tell, the 'thank you' option still redirects, just to https://submit.jotformpro.com/submit/[id]

  • David JotForm Support
    Replied on January 20, 2016 at 1:34 PM

    That redirect is the submit action that forwards the data to our servers.  Disabling that would disable data collection as well as any email or integration triggers.

  • RightScale
    Replied on January 20, 2016 at 1:38 PM

    It seems that the form submission is the root of the  problem. I guess we will need to look for something using Ajax that can submit the data without a page load.

    Thanks for your feedback.