QF Javascript validation says my element is always invalid
| From: | Mike Carter | Date: | Thu, 22 Apr 2004 08:51:34 +0000 |
| Subject: | QF Javascript validation says my element is always invalid | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-12013@lists.php.net to get a copy of this message | ||
Hi,
In my Quickform I have a group of elements defined as:
$expiry[] = &HTML_QuickForm::createElement('date', 'date', null,
array('format' => 'm/y', 'language' =>
$_SESSION['_lang'], 'minYear' =>
date('Y'), 'maxYear' => date('Y')+5, 'addEmptyOption'
=> true));
$expiry[] = &HTML_QuickForm::createElement('link', 'help', '',
'?',
"[?]", array('onclick' => "return showHelpTip(event,
'".$language['L_HelpExpiryDate']."', true);", 'class'
=> 'helpLink'));
$this->addGroup($expiry, 'expiryDateGroup',$language['L_ExpiryDate']);
I've then added a rule to ensure that the user selects values from the
two drop down date select lists.
$this->addGroupRule('expiryDateGroup', $language['L_RequireExpiryDate'],
'required', null, 1, 'client');
The problem is, when I select something and try to submit the form, I
still get the validation error message from
$language['L_RequireExpiryDate']. There is no way past it.
What have I done wrong?
Thanks in advance,
--
Mike C
__________________________________________________________________________________________
This message is confidential. Unless you are the named addressee or their delegated
representative you may not use, disclose, or copy the contents of the e-mail. If you
are not the named addressee please notify the sender immediately and delete the material
from your computer. Any views or opinions contained in this e-mail are solely those of
the author unless expressly stated otherwise. This email has been scanned for all viruses
by the MessageLabs Email Security System
__________________________________________________________________________________________