Skip to content

Required field as checkbox value #2482

@PatelUtkarsh

Description

@PatelUtkarsh

My switch is required to have checkbox 1 to be checked. But there is no way i can check required checkbox is checked or not.

array(
                'id'       => 'my_checkbox',
                'title'    => __( 'Checkboxs' ),
                'type'     => 'checkbox',
                'options' => array(
                    'checkboxa'   => __( 'checkbox 1' ),
                    'checkboxb' => __( 'checkbox 2' ), ),
),
array(
                'id'       => 'my_awesome_switch',
                'title'    => __( 'my awesome switch' ),
                'type'     => 'switch',
                'default'  => false,
                'on'       => __( 'On' ),
                'off'       => __( 'Off' ),
                'required' => array('my_checkbox','=','1'); // how do i check if checkbox 1 (checkboxa) is checked or not ?
            )

Using latest redux.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions