Support

Account

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

  • Thanks for replying John 🙂

    I am actually using that solution from Elliot:

    acf.doAction('append', $('#huub_tasks_form'));

    However, prior to the update I was using:

    acf.do_action('append', $('#huub_tasks_form'));

    Which is the old way, right?

    The strange thing is, all fields work perfectly. I even have a relationship field that gets loaded without any problems, and even the AJAX search and infinite scroll work. Select2 fields also work. Tabs work. Conditional logic works. The lot.

    But it’s only when submitting the form that if, for instance, I have not selected an item from the relationship field, the AJAX validation does not work and I am taken to the typical WordPress error screen displaying the validation message.

    I have acf_form_head() included in the header but perhaps I need to include it again in the PHP file that contains the AJAX action?