In my APS 1.2 application, it is needed to display particular setting group conditionally, depending on a value of another setting. How to hide/display setting or a group of settings conditionally?


To hide/show settings conditionally, use 'show/hide' classes, in the following format:

class="show:flag_setting_id=value" - show a setting if flag setting has particular 'value'.

class="hide:flag_setting_id=value" - hide a setting if flag setting has particular 'value'.

Or, if there are several possible values of flag setting in condition:


If flag setting has 'enum' type, changing of its value affects depending settings visibility right away. If there is verification script in application service, it will be called before settings visibility is updated in UI.


Show firstName setting is 'type' setting has value '1':

<setting class="show:type=1" id="firstName" type="string">
   <name>First Name</name>

Hide status setting if type is 1 or 3:

<setting class="hide:type=1|3" id="status" type="string">
   <name>Operation Status</name>

Show a group of settings if status setting has value 'failed' or 'error':

<group class="show:status=failed|error">
   <setting id="error_message" type="string">
       <name>Error Message</name>
   <setting id="support_contact" type="string">
       <name>Contact Support</name>

Internal content