Hello,
tl;dr I wanna use custom HTML instead of the default ACF approach for a front end form.
I’ve been trying to investigate the most efficient way I could write a form, with some inputs, checkboxes etc and upon submit tell acf to take the data, create a new record in a repeater and apply the data to the corresponding fields.
acf_form() works great, but I want to inject / modify custom snippets that differ from the admin view.
Hi @guymeyer
I’ve done this a million times. Just create the form how you want, and set the name
of each form to the key of the field you want to update. Then when you submit the post, loop through your $_POST and update the fields with update_field()
.
If you have some repeaters and such, you’ll need to use this: update_sub_field
https://www.advancedcustomfields.com/resources/update_sub_field/
Phil
I was afraid it’d be that simple. Thanks!