Settings Field Visibility
Learn how to show or hide a setting depending on the value of other settings.
Note: This tutorial series is intended for advanced users. At least a basic understanding of coding in PHP and JavaScript is required.
The visibility of a module setting can depend on the value of other settings by including one or both of the parameters described below in the setting definition.
Setting Visibility Parameters
- show_if (array)
- setting (string|string[]) — Setting value(s)
- show_if_not (array)
- setting (string|string[]) — Setting value(s)
Setting Visibility Examples
Only show setting_a
when:
setting_b
ison
Only show setting_c
when:
setting_b
ison
- AND
setting_a
is notsome_value
Only show setting_a
when:
setting_b
is one ofvalue_1
,value_3
,value_4
- AND
setting_c
is notsome_value
- AND
setting_d
is not one ofvalue_1
,value_4