-
Notifications
You must be signed in to change notification settings - Fork 583
Closed
Description
Hi, I was wondering if it was possible to toggle certain boxes based off what field is checked. For example, if I had facebook checked, the facebook box would only show up. The code I currently have below toggles the boxes if any of the checkboxes are checked. If there a way to target options within an id? I've tried variations of 'required' => array('social-networks["fb"]','equals','1'),, but none of those work. Any help would be greatly appreciated.
$this->sections[] = array(
'icon' => 'el-icon-user',
'title' => __('Social Media', 'redux-framework-demo'),
'fields' => array(
array(
'id' => 'social-networks',
'type' => 'sortable',
'mode' => 'checkbox',
'title' => __('Order Social Icons', 'options'),
'subtitle' => __('Order and activate/deactivate social icons', 'options'),
'options' => array(
'fb' => 'Facebook',
'tw' => 'Twitter',
'lin' => 'LinkedIn',
)
),
array(
'id' => 'facebook-url',
'type' => 'text',
'required' => array('social-networks','equals','1'),
'title' => __('Facebook URL', 'options'),
'subtitle' => __('Enter your Facebook URL.', 'options'),
),
array(
'id' => 'twitter-url',
'type' => 'text',
'required' => array('social-networks','equals','1'),
'title' => __('Twitter URL', 'options'),
'subtitle' => __('Enter your twitter URL.', 'options'),
)
)
);
Metadata
Metadata
Assignees
Labels
No labels