Thanks again.
On 3/5/08, Matthew Weier O'Phinney <[EMAIL PROTECTED]> wrote:
>
> -- Roberto Bouza <[EMAIL PROTECTED]> wrote
> (on Tuesday, 04 March 2008, 10:41 PM -0500):
>
> > I'm doing this piece of code in Zend_Form:
> >
> > $form->addElement('text', 'first_name');
> > $form->first_name->setLabel('first_name')
> > ->setDecorators(array(
> > array('ViewHelper', array
> > ('helper' => 'formText')),
> > array('Label',
> array('class' =>
> > 'text_box_label')),
> > array('HtmlTag',
> array('tag' =>
> > 'div', 'class' => 'text_box'))
> > ));
> >
> > And when the form gets rendered the source looks like this:
> >
> >
> > <div class="text_box"><label for="first_name" class="text_box_label
> optional">Nombre</label>
> >
> >
> > <input type="text" name="first_name" id="first_name" value=""></div>
> >
> > Just on the label - class="pepe - a optional is appearing there. Any
> ideas?
>
>
> That's by design; you'll also notice that required elements get a an
> additional 'required' class in the label. This is to allow you to use
> CSS hinting for optional and required elements.
>
>
> --
> Matthew Weier O'Phinney
> PHP Developer | [EMAIL PROTECTED]
> Zend - The PHP Company | http://www.zend.com/
>