I have made a frontend form using the
acf_form_head functions for creating new posts in a CPT. Everything works fine on that part. I have an issue with validation error messages on safari. The validation works fine and no post is created if not all the required fields have value. But when submitting a post and it validates and finds an error it does not show the acf-notice error at all, just plain default browser highlighting for the closest input that needs value. It works fine on chrome,firefox,ie and edge.
This is not only a issue on the frontend form but even in wp-admin the error messages are not rendered.
I tried setting up a required field on another local WordPress website and there it renders out the validation error message on safari. So i have no idea what the problem is, anyone has had this issue before on safari?
Have a attached some pictures showing my issues, The first two are on the frontend form and the other two are inside the wp-admin.
my ACF form function if that helps:
acf_form(array( 'echo' => false, 'return' => '/projects/?updated=1', 'updated_message' => false, 'post_id' => 'new_post', 'post_title' => false, 'post_content' => false, 'new_post' => array( 'post_type' => 'project', 'post_status' => 'publish', ), 'submit_value' => __('Create project') ));
This is how the form markup looks like when validation error occurs on Chrome, firefox, IE11, Edge:
<form id="acf-form" class="acf-form is-invalid" action method="post">
This is how the form markup looks like when validation error occurs on Safari:
<form id="acf-form" class="acf-form" action method="post">
Anyone else keen to reproduce this and check? My conclusion is that this is a bug in ACF.
By the way the forum system is very buggy it seems. This is my 10th time trying to submit a reply.
I’m facing same issue,
I have no way of testing on safari.
Have you eliminated the theme as the cause.
You must be logged in to reply to this topic.
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!