Hi,
I have:
- A radio with basic yes/no setup
- A color field with conditional logic to be shown/hidden based on the radio value.
The issue is that the color field doesn't show/hide after clicking on the radio. It shows/hides after updating the entire page.
Here's the code:
// [radio field]
array (
'id' => 'custom_color_controller',
'name' => __( 'Use Custom Color?', 'my-text-domain' ),
'type' => 'radio',
'options' => array(
'yes' => __( 'Yes', 'my-text-domain' ),
'no' => __( 'No', 'my-text-domain' )
),
'std' => 'no',
),
// [color field]
array (
'name' => __( 'Select Color', 'my-text-domain' ),
'id' => 'color_field_demo_id',
'type' => 'color',
'alpha_channel' => true,
'visible' => array(
array( 'custom_color_controller', '=', 'yes' ),
),
'std' => '#cccccc',
),
There are no console errors/warnings.