Stretchwickster
Programmer
Hi there,
I have a form built using HTML_QuickForm which has no mandatory fields. However, this means that the form can be submitted with a set of empty values. Ideally, what I would like to do is have the client-side validation kick-in to say "hey, you haven't filled anything in". Now, I've noticed that custom validation can be applied to elements and element groups, but how would I add a general validation to check that at least one field in the form is populated, so that when the call to $form->validate() is made it runs this check also.
Does anyone have any ideas?
Your advice would be much appreciated!
Clive
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer." (Paul Ehrlich)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
I have a form built using HTML_QuickForm which has no mandatory fields. However, this means that the form can be submitted with a set of empty values. Ideally, what I would like to do is have the client-side validation kick-in to say "hey, you haven't filled anything in". Now, I've noticed that custom validation can be applied to elements and element groups, but how would I add a general validation to check that at least one field in the form is populated, so that when the call to $form->validate() is made it runs this check also.
Does anyone have any ideas?
Your advice would be much appreciated!
Clive
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer." (Paul Ehrlich)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096