Difference between revisions of "Conditional Lists of Values"

From SmartWiki
Jump to: navigation, search
Line 1: Line 1:
 
The list of values selectable in a custom field can be made conditional upon the value selected in another custom field. This functionality can be configured on the following [[:Category:Custom Field Types|custom field types]]:
 
The list of values selectable in a custom field can be made conditional upon the value selected in another custom field. This functionality can be configured on the following [[:Category:Custom Field Types|custom field types]]:
 +
 
* [[Custom Field Type: Select Many – Check Boxes|Select Many – Check Boxes]]
 
* [[Custom Field Type: Select Many – Check Boxes|Select Many – Check Boxes]]
* [[Custom Field Type: Select Many – List Box|Select Many – List Box]]
+
 
* [[Custom Field Type: Select Many – Scrolling Check Box|Select Many – Scrolling Check Box]]
+
<!--* [[Custom Field Type: Select Many – List Box|Select Many – List Box]]
* [[Custom Field Type: Select One – Combo Box|Select One – Combo Box]]
+
* [[Custom Field Type: Select Many – Scrolling Check Box|Select Many – Scrolling Check Box]]-->
<br/>
+
* [[Custom Field Type: Select One - Dropdown List]]
 +
 
 +
 
 +
 
 
{|
 
{|
|[[Image:Canada-Ontario-Cities.jpg|link=]]
+
|-
| or  
+
||[[Image:Canada-Ontario-Cities.jpg|link=]]
|[[Image:US-Texas.jpg|link=]]
+
||or
 +
||[[Image:US-Texas.jpg|link=]]
 
|}
 
|}
  
 
To configure this functionality, for each dependent field:
 
To configure this functionality, for each dependent field:
 +
 
* define the field that will condition the dependent values as the "Parent Field"
 
* define the field that will condition the dependent values as the "Parent Field"
* in the settings page of the "Child Field", there's a drop down field called "Parent Field" - this must be populated with the "Parent Field" being referenced,  
+
* in the settings page of the "Child Field", there's a drop down field called "Parent Field" - this must be populated with the "Parent Field" being referenced,
 
* surround the dependent values with the ssOption syntax:
 
* surround the dependent values with the ssOption syntax:
  
:<font size="3">&lt;ssOption:''Parent Value 1''>;''Dependent Value 1'';''Dependent Value 2''&lt;/ssOption></font>
+
: <span style="font-size: medium;">&lt;ssOption:''Parent Value 1''>;''Dependent Value 1'';''Dependent Value 2''&lt;/ssOption></span>
 +
In the configuration shown below:
  
In the configuration shown below:
 
 
* In the ''Province'' field
 
* In the ''Province'' field
**''--Select One--'' will always be shown,
+
** ''--Select One--'' will always be shown,
**''Ontario'' and ''British Columbia'' will only be shown if ''Canada'' is selected in the ''Country'' field, and
+
** ''Ontario'' and ''British Columbia'' will only be shown if ''Canada'' is selected in the ''Country'' field, and
**''Texas'' will only be shown if ''United States'' is selected in the ''Country'' field.
+
** ''Texas'' will only be shown if ''United States'' is selected in the ''Country'' field.
*In the ''City'' field
+
* In the ''City'' field
**''-- N/A --'' will always be shown,
+
** ''-- N/A --'' will always be shown,
**''Toronto'' and ''Ottawa'' will only be shown if ''Ontario'' is selected in the ''Province'' field, and
+
** ''Toronto'' and ''Ottawa'' will only be shown if ''Ontario'' is selected in the ''Province'' field, and
**''Vancouver'' will only be shown if ''British Columbia'' is selected in the ''Province'' field.
+
** ''Vancouver'' will only be shown if ''British Columbia'' is selected in the ''Province'' field.
  
 
[[Image:Conditional Lists - Combined.jpg|link=]]
 
[[Image:Conditional Lists - Combined.jpg|link=]]

Revision as of 15:14, 5 September 2018

The list of values selectable in a custom field can be made conditional upon the value selected in another custom field. This functionality can be configured on the following custom field types:


Canada-Ontario-Cities.jpg or US-Texas.jpg

To configure this functionality, for each dependent field:

  • define the field that will condition the dependent values as the "Parent Field"
  • in the settings page of the "Child Field", there's a drop down field called "Parent Field" - this must be populated with the "Parent Field" being referenced,
  • surround the dependent values with the ssOption syntax:
<ssOption:Parent Value 1>;Dependent Value 1;Dependent Value 2</ssOption>

In the configuration shown below:

  • In the Province field
    • --Select One-- will always be shown,
    • Ontario and British Columbia will only be shown if Canada is selected in the Country field, and
    • Texas will only be shown if United States is selected in the Country field.
  • In the City field
    • -- N/A -- will always be shown,
    • Toronto and Ottawa will only be shown if Ontario is selected in the Province field, and
    • Vancouver will only be shown if British Columbia is selected in the Province field.

Conditional Lists - Combined.jpg

Any number of lists of values can be made dependent on other lists of values.

This feature will not work in conjunction with Dynamic Control fields.

See Also