Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hello!
In Umbraco Forms, I want to display a message instead of redirect to a confirmation page. The page still refresh and then I see my confirmation message. Sinc emy form is in a modal, I don't want my page to refresh.
How can I achieve that?
Thanks Umbraco community!
I would like to know the answer to this as well. Everything seems to work, except the page is refreshed when the form is submitted.
Umbraco Forms 7.3.1
you can just do ajax call instead of regular submit
$.ajax({ url: $form.attr('action'), type: 'POST', cache: false, data: $form.serialize(), success: function (result, textStatus, request) { //Show popup here } });
Yakov Would you have a more complete answer of changing the default form submission to an ajax submission?
Something like this should work
$('#IDOFYOURFORM').on('submit', function (e) { e.preventDefault(); var $form = $(this); $.ajax({ url: $form.attr('action'), type: 'POST', cache: false, data: $form.serialize(), success: function (result) { //do something with result here }, error: function (xhr, ajaxOptions, thrownError) { alert(xhr.responseText); } }); });
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Prevent page from refreshing after a form is submited
Hello!
In Umbraco Forms, I want to display a message instead of redirect to a confirmation page. The page still refresh and then I see my confirmation message. Sinc emy form is in a modal, I don't want my page to refresh.
How can I achieve that?
Thanks Umbraco community!
I would like to know the answer to this as well. Everything seems to work, except the page is refreshed when the form is submitted.
Umbraco Forms 7.3.1
you can just do ajax call instead of regular submit
Yakov Would you have a more complete answer of changing the default form submission to an ajax submission?
Something like this should work
is working on a reply...