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_bison
Only show setting_c when:
setting_bison- AND
setting_ais notsome_value
Only show setting_a when:
setting_bis one ofvalue_1,value_3,value_4- AND
setting_cis notsome_value - AND
setting_dis not one ofvalue_1,value_4