ACF

ACF Form: How to hide or modify a field?

The filter acf/prepare_field is the way to go when it comes to modifiy field configuration before its display in ACF Forms, as it is called right before acf_render_field().

add_filter('acf/prepare_field/name=my_field', 'acf_form_hide_field');
function acf_form_hide_field($field){
    
    return false;
    
}

ACF use the same method in front-end and back-end. So if we want to hide a specific field in front-end only, we will use the is_admin() conditional:

add_filter('acf/prepare_field/name=my_field', 'acf_form_hide_field');
function acf_form_hide_field($field){
    
    if(is_admin())
        return $field;
    
    return false;
    
}
ACF Hooks

ACF Modules