Developer Documentation

Back To Developer Documentation

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 is on

 

Only show setting_c when:

  • setting_b is on
  • AND setting_a is not some_value

 

Only show setting_a when:

  • setting_b is one of value_1, value_3value_4
  • AND setting_c is not some_value
  • AND setting_d is not one of value_1value_4

 

Join To Download Today