Support

Account

Home Forums Front-end Issues Frontend Custom Validation for acf_form Reply To: Frontend Custom Validation for acf_form

  • So I did some digging around if I could see other threads that had similar issues and found this old thread here (https://support.advancedcustomfields.com/forums/topic/validation-problems-front-end-ajax-acf-5-5/). There was no harm in checking to see if removing the NOT from acf_verify_ajax() and surprisingly all the frontend validation works as intended.

    Obviously editing the core isn’t a real solution but sadly this thread didn’t have a conclusion. One poster mentions that making sure both the the admin and the form’s action match when it comes to passing via https but my action is blank so it goes to the current page.

    Hilariously enough I found an old thread of mine from April (https://support.advancedcustomfields.com/forums/topic/how-to-validate-fields-on-the-same-page-when-using-acf_form/) where I was going through a similar issue and it had to do with when I called acf_form_head() but I’m already doing this in template_include.

    So I put everything back to what it should be and I also went and replaced the __() calls to just return 'bad bad bad'; and got the same HTML response from the AJAX validation but now my custom validation is replaced with “bad bad bad”.

    This is a bit of a doozy!