Hi Guys,
I could do with a form submitting (via AJAX), displaying the thanks message, waiting 5 secs (or so) then refreshing back to an empty form. Is this possible?
Thanks in advance
Hi Guys,
I could do with a form submitting (via AJAX), displaying the thanks message, waiting 5 secs (or so) then refreshing back to an empty form. Is this possible?
Thanks in advance
ok, I've inserted the form shortcode in the confirmation box and i've got as far as this:
<div id="messagethisperson">
<div id="messagethispersoninner">
<div id="messagethispersonclose">Close</div>
<script type="text/javascript">
jQuery(document).bind('gform_confirmation_loaded', function(event,11){
jQuery('#messagesent').fadeIn();
});
</script>
<p id="messagesent">Your message has been sent</p>
<?php gravity_form(11, false, false, false, '', true); ?>
</div>
</div>
What do I put in the 'event' variable??
The form submits fine, I just want the message sent bit to fade in. Once this is triggered I can clear the form field via jquery and it will look like its a fresh form. I just can't get the jquery function to fire when the form has been submitted
ok, I tried removing the form shortcode and it worked fine. however, it won't refresh the form back to an empty set of fields. Is there any way to do this??
removed the shortcode from the confirmation setting by the way ;)
is there any way to force the form to reset after successful submission?
ok, managed it.
used the confirmation loaded function to reload another page via jquery post which has nothing but the same form in it.
works a treat, just have to make sure that the page template loads no other content (sidebars etc), just displays the form.