Re collapse Div And Reset Contact Form On Successful Submit?
-
29-10-2019 - |
Question
http://www.thecommonwealthmembers.com/
I designed a website, and used jQuery and CSS on the contact form at the bottom (click here to inquire). When a visitor successfully submits the information after clicking the submit form (only if successful) I want the Contact Form to reset itself and I want the div to collapse also. Any ideas?
Thank you, Aaron
Solution
Well, change your function like this:
function sendForm(form) {
return PLX.Submit(form, {
"preloader":"pr",
"onFinish": function(response){
alert(response);
// collapse
$('div.inquirecontent').slideToggle();
// reset and set default value back
$('div.inquirecontent form').trigger('reset');
}
});
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow