Easy way to check if a radio button was pressed
Posted: 24 February 2011 05:26 AM   [ Ignore ]
Wallflower
Rank
Total Posts:  4
Joined  2011-02-15

Hi,
what is the most straightforward way to check if out of a set of checkboxes in a form at least one was selected when the user pressed submit ? Do I have to go via Javascript is there some other technique ?

Rgds Felix

Profile
 
 
Posted: 24 February 2011 05:28 AM   [ Ignore ]   [ # 1 ]
Teen Scream
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

You can add this parameter to ensure that at least one is checked:

rules:your_field_name="required" 

Or you can go the javascript route.

Profile
 
 
Posted: 25 February 2011 03:11 AM   [ Ignore ]   [ # 2 ]
Wallflower
Rank
Total Posts:  4
Joined  2011-02-15

Thx, was too late yesterday obvious solution. Fast support really. cool grin

Profile