Support

Account

Home Forums Backend Issues (wp-admin) Set Textarea to Uneditable Reply To: Set Textarea to Uneditable

  • I could be over thinking the issue, but it’s hard to say without seeing all of the code (and I really don’t want to see all of it) and knowing more about this field it’s not working on. It can be hard to troubleshoot issues this way.

    The questions are:

    1) Is the line of code being run to add the filter.

    
    echo 'here'; die;
    add_filter( 'acf/load_field/name=funbotic_parents', 'funbotic_load_parents' );
    

    if here is echoed and execution stops then the line is run, if not then you need to figure out why

    2) is the filter being called when your field is loaded

    This is the code from above, if the field settings are shown then it’s running

    
    add_filter( 'acf/load_field/name=funbotic_parents', 'funbotic_load_parents' );
    
    function funbotic_load_parents( $field ) {
    	$field['readonly'] = 1;
            echo '<pre>'; print_r($field); echo '</pre>';
    	return $field;
    }
    

    Based on the results of these 2 tests we can move on.