Home › Forums › Bug Reports › disable via prepare_field › Reply To: disable via prepare_field
Hello I wanted to state that I came across this issue and I believe I was able to make this work as expected for the true_false field, now I know this will be removed upon an update but maybe this can make it’s way into the production version??
I added this to line 67 of the class-acf-field-true_false.php file.
// disabled
if( array_key_exists( 'disabled', $field ) && $field['disabled']) {
$input['disabled'] = true;
$hidden['value'] = $field['value'] ? true : false;
}
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.