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
For anyone else that stumbled upon this, I followed some instructions that one of the help desk guys gave me
———–
For this kind of requirement, you could set the post_status on the acf_form() to ‘draft’ so that any changes made to the form will not be required to pass validation. You could then create some custom logic within the acf/validate_save_post to ignore all the errors if the post status is ‘draft’. The final step will be to hook into the acf/save_post to determine if all the fields have been filled and then change the post_status to publish.
Please take a look at the following resources that may help:
https://www.advancedcustomfields.com/resources/acf-save_post/
** https://www.advancedcustomfields.com/resources/acf-validate_save_post/ **
I hope this info helps.
—————
I followed the instructions in the item I have asterisks around. I created a “True/False” field that stated: “Are you ready to validate your application?” If that is FALSE, I clear all errors with acf_reset_validation_errors()
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.