Home Forums ACF PRO Prepare field Question


Prepare field Question

  • Hi just wanna ask if this code:

    function my_acf_prepare_field( $field ) {
    if( $field[‘value’] ) {
    $field[‘disabled’] = true;
    return $field;
    add_filter(‘acf/prepare_field/name=my_text’, ‘my_acf_prepare_field’);

    can be modified to target disabling a different specific field? cause this code disables itself if you save a value. but what im trying to achieve is if the my_text field has a value. disable a specific field so it cannot be edited and vise versa.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Prepare field Question’ is closed to new replies.