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
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!
© 2023 Advanced Custom Fields.