Re: QuickForm ,Rules and stars
| From: | Thomas Schulz | Date: | Thu, 12 Jun 2003 09:45:02 +0000 |
| Subject: | Re: QuickForm ,Rules and stars | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-5912@lists.php.net to get a copy of this message | ||
Xavier wrote in php.pear.general:
> since an upgrade to QuickForm3 final, i've seen a new behaviour on
> elements where a rule is applied.
>
> let's say :
>
> $form->addElement('text', 'usr_addr2',
> $msg['adresse'].'2 :',
> 'size=40');
> $form->addRule('usr_addr2', $msg['troplong'],
> 'maxlength', 50);
> $form->addRule('usr_addr2', $msg['invalide'], 'regex',
> '/^[a-zA-Z0-9àâäéèëêîïôöûüù\s\-\',]{0,50}$/');
>
> this field have not a 'required' rule.
> With my older beta2 , when rendering this with ArraySmarty this element
> doesn't have a star near it's label and everything is fine. After 3
> final upgrade, this element get a star, it look like know stars are
> applied for every element with a rule. Is this a normal behaviour ?
The Behavior is changed beetween Beta2 and RC1. The Changelog says:
"ArraySmarty renderer now requires a Smarty object and uses Smarty
templates for 'required' and errors output".
So please have a look at the SmartyStatic_example.php in /docs/Renderer and
the docs:
http://kuerzer.de/setrequiredtemplate
http://kuerzer.de/seterrortemplate
Thomas.
--
http://4bconsult.de