Resurrecting this post as I have the same issue of trying to set listsep. 

Within my form I'm trying to create a multiCheckbox element with the
following call.

$displayGroupElementName[] = 'repeat_days';
$this->addElement(
        'multiCheckbox',
        end($displayGroupElementName),
        array(
                'label' => 'Repeat On',
                'multiOptions'=>$options,
                'listsep'=>' ',
        )
);

However, the listsep parameter never overrides the default value.

I've even tried doing a call to grab the element within the form:
$element = $this->getElement('repeat_days');

Followed by setting the options:
$element->setOptions(array('listsep'=>' '));

Both methods yield no change in the element generation.  It still uses the
default seperator '<br />' :(.


Matthew Weier O'Phinney-3 wrote:
> 
> -- Jacky Chen <[EMAIL PROTECTED]> 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       | [EMAIL PROTECTED]
> Zend - The PHP Company   | http://www.zend.com/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/how-can-i-set-list-separator-in-zend_form--tp17098330p19807679.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to