• Resolved bombardos

    (@bombardos)


    Is there a way to make a field in a Caldera form read only? and how?

    I have this, and added it to the form using a processor but…

    add_filter( ‘caldera_forms_field_attributes’, function( $attrs, $field ) {
    if( ‘fld_452244’ == $field[ ‘ID’ ] )
    $attrs[ ‘type’ ] = readonly;
    }
    return $attrs;
    }, 20, 3);

    • This topic was modified 7 years, 6 months ago by bombardos.
    • This topic was modified 7 years, 6 months ago by bombardos.
Viewing 1 replies (of 1 total)
  • Thread Starter bombardos

    (@bombardos)

    Nevermind, I got it…

    add_filter( ‘caldera_forms_field_attributes’, function( $attrs, $field ) {
    if( ‘fld_452244’ == $field[‘ID’] ) {
    $attrs[‘readonly’] = readonly;
    }
    return $attrs;
    }, 20, 3);

Viewing 1 replies (of 1 total)
  • The topic ‘Make a form field read only’ is closed to new replies.