Home › Forums › ACF PRO › ACF Form – Front end form save as a draft with required fields › Reply To: ACF Form – Front end form save as a draft with required fields
Hello Chris, I try to use acf_reset_validation_errors()
inside acf/validate_save_post
.
I can see the request to admin-ajax.php and it returns {"success":true,"data":{"valid":1,"errors":0}}
but the error messages still appear and the post isn’t saved.
I have set post_status
to draft
and I have this :
add_action('acf/validate_save_post', 'clear_all_errors', 10, 0);
function clear_all_errors() {
acf_reset_validation_errors();
}
Can you share some code about how you did it ?
EDIT : It was because now ACF use the required
on inputs
I’ve added formnovalidate
on my submit button and it solved my issue.
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.