Spry Checkbox Widget Examples

Below is a form that uses the basic checkbox widget. This widget will check to ensure at least one chechbox is checked. Click on the submit button without checking a leisure activity to see the error message (by default the checkbox widget will not validate the checkbox form control until after the user clicks on the submit button).

Select your favorite leisure activities.

You must select at least one leisure activity.
Watch TV Go To Movies Play Golf
Play Tennis Bike Riding Running
Listen to Music Read Shop

Below is a form that uses a checkbox widget that will validate if the user has selected at least one checkbox, but no more than 3 checkboxes. The widget will do the validation each time the user makes a change in the checkbox part of the form.

Select from 1-3 favorite leisure activities.

You must select at least one leisure activity. You must select at least one leisure activity. You cannot select more than 3 leisure activities.
Watch TV Go To Movies Play Golf
Play Tennis Bike Riding Running
Listen to Music Read Shop

Below is a form that uses a checkbox widget that will validate if the user checks 0-2 checkboxes (the user is not required to select a checkbox). The widget will do the validation each time the user makes a change in the checkbox part of the form.

Select from up to 2 favorite leisure activities. You don't have to select any if none apply.

You cannot select more than 2 leisure activities.
Watch TV Go To Movies Play Golf
Play Tennis Bike Riding Running
Listen to Music Read Shop