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

From SmartWiki
Jump to: navigation, search
 
Line 11: Line 11:
 
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.
 
   
 
   
[[Category: Custom Field]][[Category:Java Script Examples]]
+
[[Category: Custom Fields]][[Category:JavaScript Examples]]

Revision as of 14:15, 8 December 2008

SmartSimple does not support a Select One - Radio button type field but you can use a check box field to re-create this type of functionality.

1. Create a custom field: Select Many - Check Box.

2. Add this following code to the HTML tag setting:

onclick="onlyonechecked(this)"

3. Save the field.

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