-- iceangel89 <[email protected]> wrote
(on Tuesday, 28 April 2009, 11:30 PM -0700):
> how can i remove decorators from form elements? say submit and hidden
$form->{elementname}->removeDecorator('{decoratorname}');
But in all liklihood, instead of doing that, simply specify the
decorators you *want* to use when creating the element:
$form->addElement('submit', 'submit', array(
'ignore' => true,
'required' => false,
'decorators' => array(
'ViewHelper',
),
));
> i dont really get the set/add/...Decorators function
addDecorators() adds decorators to render; setDecorators() overwrites
the current decorators with the provided list.
It sounds to me like you may benefit from my recent decorators
tutorials:
http://short.ie/zfdecorators
> $form->setDecorators(array(
> 'FormElements',
> array('HtmlTag', array('tag' => 'dl')),
> 'Form'
> ));
>
> whats the meaning of the parameters? what happens if i want to do something
> like
>
> <form ...>
> <p><label ...></label><input ... /></p>
> <p><label ...></label><input ... /></p>
> <p><input type="submit" ... /></p>
> </form>
--
Matthew Weier O'Phinney
Project Lead | [email protected]
Zend Framework | http://framework.zend.com/