Home › Forums › ACF PRO › acf_form no data on the frontend for individual field. › Reply To: acf_form no data on the frontend for individual field.
You cannot edit only the sub fields on a front end form without including the parent field.
The way to do this would be to include the group field in your front end form and then use an acf/prepare_field filter for each of the fields that you do not want to show and return false for these fields on the front end. Use the field key variant.
a quick example
add_filter('acf/prepare_field/key=field_XXXXXXX', 'hide_acf_field_on_front');
function hide_acf_field_on_front($field) {
if (is_admin()) {
// allow field in admin
return $field;
}
// hide on front
return false;
}
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.