Home › Forums › General Issues › Frontend form – post via ajax? › Reply To: Frontend form – post via ajax?
This code is great, but I also need to handle some custom validation and errors. So my questions are:
1) How do you handle and display any validation errors?
2) How can I add in custom validation?
I was doing this with a add_filter('acf/validate_value/)
call, but with the AJAX submit on the form when this fails it seems to just halt the ajax (keeps spinning forever).
I’m guessing the solution has something to do with moving my code to the acf.add_filter('validation_complete')
JS filter, but any guidance would be appreciated. Thanks!
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!
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.