- This topic has 1 reply, 2 voices, and was last updated 1 month ago by .
How could I add a readonly attribute to checkbox list items if one them is checked.
[ '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.
Thank you 🙂
- You must be logged in to reply to this topic.