State Emitter for Checkboxes?
Hey my friends,
i have some field which only be activ if a checkbox field is true.
how should i create this hide/show state emitter and state handler?
'a4newreadlessmore_desk_tab_unfolded' => array(
'type' => 'checkbox',
'label' => __('entfalteter Text im Desktop und Tablet', 'so-widgets-bundle'),
'default' => false,
'state_emitter' => array(
'callback' => 'conditional',
'args' => array( 'a4newreadlessmore_desk_tab_unfolded' )
),
),
'a4newreadlessmore_desk_tab_height' => array(
'type' => 'number',
'label' => __('Height für Desktop und Tablet', 'so-widgets-bundle'),
'description' => 'nur Höhe in Pixelanzahl wie 300',
'state_handler' => array(
'a4newreadlessmore_desk_tab_unfolded' => array('show')
)
),This is our free support forum. Replies can take several days.
Need fast email support? Get SiteOrigin Premium
Replies
1Hi Sam,
You should set a state based on the value of the field. You can see an example of this in the Conditional Callback example and in the SiteOrigin Hero widget.
Replies on this thread are closed.
Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.