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)
2) title
3) message
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.