Good evening,
I have the following option in Redux Framework (version 3.1.9):
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',
)
),
And the output (if all three options are checked) is:
[fb] => 1
[tw] => 1
[lin] => 1
After this option I want to display a text field for every checked social network in this list and I have the example text input:
array(
'id' => 'facebook-url',
'type' => 'text',
'required' => array('social-networks["fb"]','equals','1'),
'title' => __('Facebook URL', 'options'),
'subtitle' => __('Enter your Facebook URL.', 'options'),
),
Of course the “required” argument doesn’t work.
Is there a way to use this argument by using an option from a field and not only the ID.
Thanks
According to http://docs.reduxframework.com/redux-framework/arguments/required/, your conditional option should look like this:
Next option:
and so on.