Re: HTML_QuickForm: how to validate hidden?

From: Date: Sat, 11 Feb 2006 08:36:44 +0000
Subject: Re: HTML_QuickForm: how to validate hidden?
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-22931@lists.php.net to get a copy of this message
Le 11 févr. 06 à 02:39, Justin Patrin a écrit :
On 2/10/06, Naoto Yamashita <puriketsu_com@yahoo.co.jp> wrote:
Environment: Mojavi2 + HTML_QuickForm + smary I want to validate hidden tag. by addRule, but it doesn't work at all. Is this spec? Other tags like text, password woks well. Code: $form->addElement('hidden', 'test', ''); $form->addRule('test', 'test is required', 'required', '');
QF probably doesn't validate hidden fields. You'rre right, though, it should be able to as hiden fields are still editable by the user in the right environment. I suggesr adding a feature request. Until then try addFormRule().
You could also create a custom QuickForm_Element, but it will be rendered as a normal element, so it will add an empty row to your form table if you use the default renderer.

« previous php.pear.general (#22931) next »