Home › Forums › Bug Reports › 5.7 – AJAX validation broken on acf_form() front-end › Reply To: 5.7 – AJAX validation broken on acf_form() front-end
No worries, must be difficult to understand everyone’s coding problems! 🙂
When the form is loaded via AJAX in a modal, everything in the form works: Relationship field, conditional logic, etc. If I fill in all required fields (Relationship field is required), the form submits fine and the new post is created.
It’s when I leave that field empty that ACF should validate it and show the typical red error box for that field. Instead, I’m taken to a page with the validation errors.
Now, if I load the form on a page template, validation does work and if I leave empty the relationship field, I get the error on the actual form.
That’s why I was asking if there’s anything else I should call in the success callback of the AJAX call apart from acf.do_action('append', $('#popup_id'));
?
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.