Difference between revisions of "Template:StoredValue"

From SmartWiki
Jump to: navigation, search
(Created page with "If you want the value stored in a combo box custom field to be different from what is displayed in the combo box, you can use t...")
 
 
Line 1: Line 1:
If you want the value stored in a [[Custom Field Type: Select One – Combo Box|combo box custom field]] to be different from what is displayed in the combo box, you can use the following syntax in the ''Values'' section of the custom field settings:
+
If you want the value stored in a [[Custom Field Type: Select One - Dropdown List|Dropdown List field]] to be different from what is displayed in the combo box, you can use the following syntax in the ''Values'' section of the custom field settings:
  
<pre style="white-space: pre-wrap;
+
<pre style="white-space: -o-pre-wrap; word-wrap: break-word;">StoreValue1=DisplayValue1;StoreValue2=DisplayValue2;StoreValue3=DisplayValue3;</pre>
white-space: -moz-pre-wrap;
 
white-space: -pre-wrap;
 
white-space: -o-pre-wrap;  
 
word-wrap: break-word;">StoreValue1=DisplayValue1;StoreValue2=DisplayValue2;StoreValue3=DisplayValue3;</pre>
 
  
* The value before the equals sign, known as the ''stored value'', will be stored.  
+
* The value before the equals sign, known as the ''stored value'', will be stored.
 
* The value after the equals sign, known as the ''display value'', is what will be displayed in the combo box (or check boxes), but does not get saved.
 
* The value after the equals sign, known as the ''display value'', is what will be displayed in the combo box (or check boxes), but does not get saved.
  
 
By default, the stored value is shown when fields are referenced in [[List View]]s. Selecting the ''Show Display Value in List Views'' option in the custom field settings will display the display value.
 
By default, the stored value is shown when fields are referenced in [[List View]]s. Selecting the ''Show Display Value in List Views'' option in the custom field settings will display the display value.

Latest revision as of 15:41, 10 September 2018

If you want the value stored in a Dropdown List field to be different from what is displayed in the combo box, you can use the following syntax in the Values section of the custom field settings:

StoreValue1=DisplayValue1;StoreValue2=DisplayValue2;StoreValue3=DisplayValue3;
  • The value before the equals sign, known as the stored value, will be stored.
  • The value after the equals sign, known as the display value, is what will be displayed in the combo box (or check boxes), but does not get saved.

By default, the stored value is shown when fields are referenced in List Views. Selecting the Show Display Value in List Views option in the custom field settings will display the display value.