Difference between revisions of "Allowing Only One Check Box to be Selected"
From SmartWiki
Line 13: | Line 13: | ||
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 | + | For a [[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 07:44, 16 May 2013
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 a Select One - Combo Box, the "Show as Radio Buttons" option can be selected to display the field selections as "radio buttons."
Note
- If using onlyonechecked on a Select Many - Check Box field and you also want to Show/Hide Header you should use _showhideheader instead of _showhideheadercheckbox