Support

Account

Home Forums ACF PRO Persisting Data in Front End Form

Solved

Persisting Data in Front End Form

  • Hello everyone,

    I have created a CRUD System using ACF Pro V. 5 and I have a custom post type named certificates which in turn has its own custom fields created with acf.

    Then I used the handy acf_form() to create a front end form and it works perfectly. However, I would like to persist the data of the last form when I create a new certificate in the front end form. Is this posible?

  • Not directly.

    This is only a thought and I don’t know if it will work, so you’ll need to test out the theory.

    You could put the values from the ACF form submission into a SESSION value or some other persistent value. To do this you would create an acf/save_post filter http://www.advancedcustomfields.com/resources/acfsave_post/

    Then to load the last values into the form when a new form is loaded you can use an acf/load_field filter. http://www.advancedcustomfields.com/resources/acfload_field/. The example shows changing field choices, but this can be used to change any ACF field argument. You can use this filter to change the default value of the field to match the last saved value.

  • Hello John, This is exactly right. using the acf/save_post to save variables and then the acf/load_field filters did the trick perfectly.

    Thank you for your assistance.

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

The topic ‘Persisting Data in Front End Form’ is closed to new replies.