I want to redisplay my form that is using AJAX to submit.
I want to redisplay my form that is using AJAX to submit.
I'm wondering how i can do this also. Using ajax for form submission. Would be great to keep the form visible just in case a user needs to send another message (without having to refresh the page).
AJAX doesn't keep the form visible, AJAX submits the form without submitting the entire page or reloading the entire page. The confirmation message is then instantly displayed. The form itself goes away and is replaced by the confirmation message. The form will redisplay if the page is refreshed.
We can look into doing modal window style confirmation messages in a future release, which would allow the form to continue displaying and the confirmation message appear in a modal window. But currently this isn't a feature.
Yes, it would definitely be nice to have the response message not overwrite the form. I'm going to have to do some hacky code to enable this as its something I need or I will have to not use gravityforms ><
Thanks for your time!
Has there been any news on this issue? I would really love this implementation? I know this was 5 months ago which is why im asking. :)
Hi umarglobal,
Rather than displaying the form immediately after submission, I have a snippet that lets you add a link to the confirmation message which allows you to reload the form to submit again. Here is a quick screenr to visually demonstrate this and the snippet as well:
http://www.screenr.com/FGfs
http://pastie.org/2997231
You'll want to paste the snippet in your theme's functions.php file and update the "115" in "gform_pre_render_115" to the ID of your form.
hey david... could you please explain how to use your code-snippet a little better... when i put it in my functions.php file (and also change the form id)... i get a blank screen.
Hi sidjags,
If you're pasting the snippet inside an existing <?php ?> block, you'll want to remove the opening <?php block from my pasted snippet. Let me know if you're still experiencing issues.