Difference between revisions of "Allowing Only One Check Box to be Selected"

From SmartWiki
Jump to: navigation, search
Line 1: Line 1:
 
{{UnderConstruction}}
 
{{UnderConstruction}}
 
[[SmartSimple]] does not have a '''Select One - Radio button''' field type but you can use a check box field to re-create this type of functionality.
 
 
  
 
To prevent a user from selecting more than one Check Box for the associated [[Custom Field]], add this code to the '''HTML Tag''' section of the [[Custom Field]]:
 
To prevent a user from selecting more than one Check Box for the associated [[Custom Field]], add this code to the '''HTML Tag''' section of the [[Custom Field]]:
Line 13: Line 10:
 
::and  
 
::and  
 
* [[Custom Field Type: Select Many – Scrolling Check Box|Select Many - Scrolling Check Box]]
 
* [[Custom Field Type: Select Many – Scrolling Check Box|Select Many - Scrolling Check Box]]
 
  
 
The [[User|user]] will not be able to select more than a single check box with this code in place.
 
The [[User|user]] will not be able to select more than a single check box with this code in place.
  
 +
For the [[Custom Field Type: Select One – Combo Box|Select One - Combo Box]], the "Show as Radio Buttons" option can be selected to display the field selections as "radio buttons."
  
 
==Note==
 
==Note==

Revision as of 08:43, 16 May 2013

Template:UnderConstruction

To prevent a user from selecting more than one Check Box for the associated Custom Field, add this code to the HTML Tag section of the Custom Field:

onclick="onlyonechecked(this)"


This can be used for:

and

The user will not be able to select more than a single check box with this code in place.

For the Select One - Combo Box, the "Show as Radio Buttons" option can be selected to display the field selections as "radio buttons."

Note