How to save fields on custom front-end form?
-
I would like to style my own front-end form (that creates a new post) and save the field inputs as ACF fields (so not using
acf_form()
).What’s the easiest/cleanest way to do so?
The only solution that comes to my mind after reading the Doc is:
- Create
<input>
fields - Upon submit grab every field with
$_POST[..]
- Look up the field_keys (e.g.
field_424244ec4cds03
) and runwp_update_postmeta
to create every meta entry manually
Is that the way to go?
I was wondering whether there might be a chance to hook into somewhere and do something like
$_POST['fields']['field_key']=my_value
. This way I would change the value before it is inserted into the database by ACF (no need to do the database insertion by myself..).Any ideas/help greatly appreciated!
https://www.ads-software.com/plugins/advanced-custom-fields/
- Create
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to save fields on custom front-end form?’ is closed to new replies.