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.
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.