HTML_QuickForm Form Elements Error Issue
| From: | Sarah Gray | Date: | Wed, 02 Mar 2005 00:42:10 +0000 |
| Subject: | HTML_QuickForm Form Elements Error Issue | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-17769@lists.php.net to get a copy of this message | ||
Hi --
I'm having a bizarre behaviour -- I have a form which is a series of
questions, a test When creating the form, I apply the "required" rule
to every element in the form in a loop like this:
$form->addRule($question->question_id, 'Required', 'required');
and when I layout the form I put an asterisk by each element, like so:
{if $element.required}<span class="error">*</span>{/if}
Every single element is asterisked, as it should be.
BUT when I submit the form and printout the error array (for debugging
purposes), only the first ten elements are in it -- and you can
successfully submit the form without checking anything but the first ten
elements!
.
This didn't use to be the case -- I don't know where the bug came from
and it's come at a terribly bad time. I'm really flummoxed how elements
could have the element.required property and not stop the browser from
submitting if they are not selected.
Does anyone have any suggestions / hints / help? I'm pretty lost at the
moment -- and this bug came out of seemingly nowhere -- it did not use
to behave like this but I haven't changed any of my PEAR packages.
Thanks,
Sarah