Limiting Selections
Saturday August 9, 2008
JavaScript bridges the gap between radio buttons and checkboxes.
Radio buttons work perfectly when you want your visitors to select one out of a number of options. They don't help when you want your visitors to more than one but want to limit the number of selections. To allow more than one selection we have to use checkboxes instead. That means that we have to add the code ourselves that will apply a limit to the number of selections instead of having it happen automatically.
Of course we may want more than one group on the same form so we need to adopt a naming convention for our boxes to identify the groups to which they belong. That plus a call to a simple JavaScript function allows us to create groups where the maximum number of selections can be set to whatever value you like.
Limiting Selections


No comments yet. Leave a Comment