Home › Forums › Feature Requests › Exclude checkbox for frontend form › Reply To: Exclude checkbox for frontend form
I just created a tab of stuff that should be internal and once it hits that tab it breaks the output. So everything after the private tab is hidden. This way I don’t have to go to php anytime I add a field. Works for me in this situation.
add_filter('acf/field_group/get_fields', 'check_acf_fields');
function check_acf_fields($arg){
$x=0;
foreach ($arg as $field) {
if( in_array('Internal', $field,true) || in_array('should only be internal', $field,true) ){
$output = array_slice($arg, 0, $x);
return $output;
}
$x++;
}
}
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.