Difference between revisions of "Template:CFComboBoxBP"

From SmartWiki
Jump to: navigation, search
(Created page with "Best practice when creating a combo box with a '''--Select One--''', use store-value=display value syntax with a space as the stored value: <pre style="white-space: pre-wrap; ...")
 
m
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
Best practice when creating a combo box with a '''--Select One--''', use store-value=display value syntax with a space as the stored value:
+
The best practice when creating a combo box with a '''--Select One--'''is to use store-value=display-value syntax with a space as the stored value:
 
<pre style="white-space: pre-wrap;  
 
<pre style="white-space: pre-wrap;  
 
  white-space: -moz-pre-wrap;  
 
  white-space: -moz-pre-wrap;  
 
  white-space: -pre-wrap;  
 
  white-space: -pre-wrap;  
 
  white-space: -o-pre-wrap;  
 
  white-space: -o-pre-wrap;  
  word-wrap: break-word;">=--Select One--;Option 1;Option 2</pre>
+
  word-wrap: break-word;"> =--Select One--;Option 1;Option 2;Option 3;Option 4</pre>
  
This ensures that the database won't store '''--Select One--''' which may cause security issues based on specific security settings.
+
This ensures that the database won't store the value '''"--Select One--"''' which may cause security issues based on specific security settings.

Latest revision as of 10:48, 23 March 2016

The best practice when creating a combo box with a --Select One--is to use store-value=display-value syntax with a space as the stored value:

 =--Select One--;Option 1;Option 2;Option 3;Option 4

This ensures that the database won't store the value "--Select One--" which may cause security issues based on specific security settings.