Support

Account

Home Forums Feature Requests Feature Request: Hidden / Disabled Field Type Reply To: Feature Request: Hidden / Disabled Field Type

  • Hi,

    I have found a solution to hide easily a field :

    add_filter( 'acf/load_field/name=inscription_classe', [ $this, 'hide_field' ] );
    
    public function hide_field( $field ) {
    	$field['conditional_logic'] = 1;
    
    	return $field;
    }

    The only problem is : if the field is manually posted with the form (by dom modification or http request modification), the field is saved to the db.

    Not terrible because i don’t want form submitter can change this field. I tried readonly disabled no effect on db saving.

    Always no solution to hide completely a field without the possibility to submit it ?