Home › Forums › Quform WordPress › Reset form after submit and remove error messages
- This topic has 5 replies, 2 voices, and was last updated 3 years, 3 months ago by veganwebagency.
- AuthorPosts
- August 22, 2021 at 11:07 am #33311veganwebagencyParticipant
Hi,
I have a form inside a pop-up and this pop-up is used several times on the same page.
Now I have two questions:1. Is there a function to reset / recreate the form after the user submitted the form and saw the confirmation message?
2. Is there a better solution to remove the error messages from the form?
After searching in the forum I found the following solution:$('.quform-field').each(function () { $(this).closest('.quform-element').removeClass('quform-has-error').find('.quform-error').remove(); });
Thanks in advance
MichèleAugust 23, 2021 at 9:14 am #33317AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
August 23, 2021 at 9:18 am #33319AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
August 23, 2021 at 2:04 pm #33322veganwebagencyParticipantHi Ally
I checked the settings and they are correct but the form is still empty if you close the pop-up after you saw the confirmation message and open a new one (with the same form).
I also tried your code but that doesn’t help either with recreating the form.
But the code worked perfectly for clearing all error messages so thank you for that. 🙂Here is a link to the page I’m working on:
I also have your reset code implemented which gets fired if you close the pop-up.Regards
Michèle- This reply was modified 3 years, 3 months ago by veganwebagency.
August 24, 2021 at 9:25 am #33327AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
August 24, 2021 at 10:03 am #33331veganwebagencyParticipantHi Ally
Yeah I need the option ‘hide form’ because I don’t want the form to be visible after submitting it.
I added your code and it works perfectly now! 🙂Thank you so much for your help! 🙂
Regards
Michèle - AuthorPosts
- You must be logged in to reply to this topic.