Home › Forums › General Issues › Where is the best place for updating hidden fields in acf_form()? › Reply To: Where is the best place for updating hidden fields in acf_form()?
At final I reject acf_form() because I don’t know how can I use it with hidden fields.
I think ACF need the setting “Hidden in front-end: true/false” and the parameter acf_form() “input_init_values” => $init_values.
For example, how must I do with acf_form():
Question post about some item:
1) item_id (hidden for user in front-end)
Without acf_form() it will be:
<form action="<?php echo get_stylesheet_directory_uri() ?>/question-update.php" method="POST"> <input type="hidden" name="item_id" value="<?php echo get_the_ID() ?>" /> <input type="text" name="title" value="" /> <input type="textarea" name="message" value="" /> </form>
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
Accordions are a great way to group related information while allowing users to interactively show and hide content. In this video, Damon Cook goes in-depth on how to create an accessible accordion block using ACF PRO’s Repeater field.https://t.co/RXT0g25akN— Advanced Custom Fields (@wp_acf) March 2, 2023
© 2023 Advanced Custom Fields.