I’m looking to overwrite programatically the form values dynamically in the acf_form function. How would I go about doing this?
I currently am using acf_form for a post type, then I have variants of these post types that will use the same form but are not actually post types. I would like to grab the data for these then populate the form with this data.
Hi @maxaud
If you want to do it for a select field, you can try to follow this guide: https://www.advancedcustomfields.com/resources/dynamically-populate-a-select-fields-choices/.
But in general, you should be able to modify the returned fields by using the acf/load_field and modify the returned value by using the acf/load_value filters.
I hope this helps 🙂