View Single Post
  #4 (permalink)  
Old Apr 21st, 2008, 20:30
Aso's Avatar
Aso Aso is offline
Chief Moderator

SuperMember
Join Date: Oct 2007
Location: UK
Posts: 1,039
Blog Entries: 2
Thanks: 5
Thanked 26 Times in 23 Posts
Re: help with checkbox and textfield in form

Gather all the checkboxes in an array and add the values. If the total is equal to zero, no checkbox was selected. For the text field, just check the value length is greater than or equal to one.
Code: Select all
if (checkboxes.total == 0 || textfield.value <= 1) {
    return false;
}
Reply With Quote