QuickForm::element::setRequired
| From: | Wolfram Kriesing | Date: | Wed, 09 Apr 2003 16:18:50 +0000 |
| Subject: | QuickForm::element::setRequired | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-4732@lists.php.net to get a copy of this message | ||
is it possible, to set any rule (required in my case) from with in an element class?
class form_email extends HTML_QuickForm_text {
function form_email()
{
$this->HTML_QuickForm_text('newData[email]',
'Email','size="30"');
}} i got a simple class as shown above. what i would like to do now is smthg like $this->setRule('Please give your email','required') inside the class. since i have this field in many forms and the handling is always the same, i just created my own class for it ... is this possible. PS: Bertrand thank you for your patience with all us QuickForm-questioners :-) -- Wolfram ... opensource @ vision:produktion ... http://opensource.visionp.de ... translating template engine .... http://sf.net/projects/simpletpl ... authentication system .... http://sf.net/projects/auth