List Info

Thread: how can i set list separator in zend_form?




how can i set list separator in zend_form?
user name
2008-05-07 01:36:24
Hi all,
&nbsp; &nbsp;  I want render multiCheckbox or Radio with no <br />n separator in Zend_Form,how can i do that? I look for the code at Zend_Form_Decorator_ViewHelper,there is no listsep parameter to be passed.
 
Best Regards.
Jacky
Re: how can i set list separator in zend_form?
user name
2008-05-07 08:53:49
-- Jacky Chen <jacky.hfgmail.com> wrote
(on Wednesday, 07 May 2008, 02:36 PM +0800):
>      I want render multiCheckbox or Radio with no
<br />n separator in
> Zend_Form,how can i do that? I look for the code at
> Zend_Form_Decorator_ViewHelper,there is no listsep
parameter to be passed.

All element attributes are passed as attributes to the view
helper. So,
simply set a 'listsep' attribute on your form element:

    $element->listsep = '';

or when adding the element to the form:

    $form->addElement('radio', 'foo', array(
        'listsep' => '',
        // ...
    ));

-- 
Matthew Weier O'Phinney
Software Architect       | matthewzend.com
Zend - The PHP Company   | http://www.zend.com/

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )