Home › Forums › Front-end Issues › Submit frontend form even if validation fails › Reply To: Submit frontend form even if validation fails
Thanks for your post and considerations.
To bypass the vaidation is easy, with acf_reset_validation_errors();
(see example in https://www.advancedcustomfields.com/resources/acf-validate_save_post/). The tricky thing for me now is to submit the form two times: one time with bypassing validation for saving the post-edit and the second time showing the validation. I try to figure this out with an automatic javascript submit after the reload of a first submit. But mabe it gets complicated, since I’m not too experienced. I’ll have a closer look at your idea too, creating my own validation with acf_add_validation_errro();
. I’ll post what my solution will be, but need some time.
An other idea is to install an automatic submit as draft say every minute with javascript setInterval. Then I’d need to find a way to submit without reloading the page.
If anyone has more hints how to go, I’ll appreciate it. Greetings.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
Accordions are a great way to group related information while allowing users to interactively show and hide content. In this video, Damon Cook goes in-depth on how to create an accessible accordion block using ACF PRO’s Repeater field.https://t.co/RXT0g25akN
— Advanced Custom Fields (@wp_acf) March 2, 2023
© 2023 Advanced Custom Fields.
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.