Hi all. I have more forms that I need to "pass through" JS to see if the required elements are not missing/compiled.

i have thinked to set a class "required" to these elements and then via JS (Jquery) get all of theme and check if they are not compiled.

I have tried to  a simple login form:

$this->username->setLabel('Username')
                ->setAttrib('class','required')
               ->OTHER_THINGS;

This is the HTML code:

<dt><label for="username" class="required">Username</label></dt>
<dd>
<input name="username" id="username" value="" class="required" maxlength="30" size="30" type="text"></dd> The class required permit me to set all labels required to a red color text (via css, obv.) so thanks for the idea.

My question is : is this the correct way ? I need to use decorator ?

Tnx.
M.

--
Michel 'ZioBudda' Morelli                       [EMAIL PROTECTED]
Consulenza sistemistica in ambito OpenSource.
Sviluppo applicazioni web dinamiche (LAMP+Ajax)
Telefono: 0200619074
Telefono Cell: +39-3939890025 --  Fax: +39-0291390660

http://www.ziobudda.net ICQ: 58351764 http://www.ziobuddalabs.it Skype: zio_budda http://www.ajaxblog.it MSN: [EMAIL PROTECTED] JABBER: [EMAIL PROTECTED]

Reply via email to