Support

Account

Home Forums Front-end Issues acf_form – save progress without submitting

Solving

acf_form – save progress without submitting

  • Hi,

    Is there any way to use the front-end capabilities and save partially filled-in forms to be completed later and only once they are, have them create a post?
    I’m assuming that we’d need to have a [save] that sets the new post to Draft and a [submit] that sets the post to Publish.

    Also, how would you proceed with validation for the saved but not submitted part? Rather, how can you conditionally turn off validation on all fields based on .. IDK, a hidden field? radio?

    Thank you very much.

  • Did you ever find information about the save partially filled-in forms?

  • There really isn’t a simple way to do this.

    The biggest problem is choosing to save it as a draft or to publish it. This could potentially be achieved in your acf/pre_save_post filter https://www.advancedcustomfields.com/resources/acf-pre_save_post/. You wold need to test every field to see if something is missing and decide at that point if you want to create the post as a draft or publish it.

    In order to do the above you would need to disable all of the built in ACF validation. Every field would need to be created in such a way that it can be submitted empty. You can’t have any required fields and you must allow all values to be NULL or empty. In order to do any validation on submitted values you would need to build all of your own acf/validate_value filters for every field https://www.advancedcustomfields.com/resources/acf-validate_value/ and you’d need to take into account that a field could be empty and only check validation if the field has a value.

    Depending on how many fields and the type of fields involved this could be a large and complicated project, or not.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.