aztechy wrote:
> 
> However, the listsep parameter never overrides the default value.
> 

The example given by Matthew was actually incorrect.  The solution is:

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

Although values in the options array are set as attribs, I believe the
existence of a class method by that name is checked before setting an
arbitrary attribute. 

'listsep' will indeed be set as an attribute as described by Matthew, but it
will be overriden because Zend_Form_Element_Radio (ie: Multi by extension)
attempts to set a separator using the "setSeparator" method.  To avoid this,
you can add the 'separator' option to the options list.  This calls the
function directly just like setting 'label' => 'somelabel' calls setLabel().  

In addition, you may also use this directly against an element by calling:
$element->setSeparator("");

If no separator is defined using "setSeparator()", then the default is used:
"<br />".
-- 
View this message in context: 
http://www.nabble.com/how-can-i-set-list-separator-in-zend_form--tp17098330p20510792.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to