1. Computing
Send to a Friend via Email

Limiting Selections

Part 1 : Introduction

Radio buttons are the ideal choice where you want your visitor to select one out of a number of different options but if you want to allow more than one option to be selected then you can't use radio buttons. If we just use checkboxes instead then our visitor will be able to select any number of options between zero and the total number of choices given. There is no button format that just allows two or three out of a larger number of options to be selected.

We can solve this problem by using some simple Javascript code to convert ordinary checkboxes into checkbox groups where there is a maximum number of entries within each group that can be selected.

Let's begin by taking a look at an example so that we can see how this works.

©2014 About.com. All rights reserved.