Custom Fields
Re-Envisioned
Support General Add readonly attribute to checkbox list items

  • Creator
    Topic
  • #30881
    ben06
    Participant

    Hi,

    How could I add a readonly attribute to checkbox list items if one them is checked.

    Ex:

    
    [
     'name'    => __( 'Choices' ),
     'id'      => 'choices',
     'type'    => 'checkbox_list',
     'options' => [
                   'none'    => __( 'None', 'your-text-domain' ),
                   '1'       => __( '1', 'your-text-domain' ),
                   '2'       => __( '2', 'your-text-domain' ),
                   '3'       => __( '3', 'your-text-domain' ),
                  ],
    ],
    

    If 'None' is checked, '1', '2', '3' have to be readonly.

    I know it's weird, i can split this field with 2 radio button fields but I have to use 1 checkbox list.

    Any thoughts?

    Thank you 🙂

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.