ZF-5608: [CLOSEME] No way to pass ListSep parameter to Zend_View_Helper_FormMultiCheckbox

Issue Type: Bug Created: 2009-01-22T04:07:21.000+0000 Last Updated: 2009-01-22T05:06:55.000+0000 Status: Resolved Fix version(s): Reporter: Artur Bodera (joust) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_View

Related issues: Attachments:


When rendering multiCheckboxes or radio, the list separator is defined in function itself, not $options array.

It makes it impossible to use Zend_Form_Element_Multi with custom separator (instead of default

In class Zend_View_Helper_FormMultiCheckbox

<pre class="highlight">
    public function formMultiCheckbox($name, $value = null, $attribs = null,
        $options = null, $listsep = "<br></br>\n")
        return $this->formRadio($name, $value, $attribs, $options, $listsep);

The $listsep should be part of $options. It should be then propagated to Zend_View_Helper_FormRadio.

The reason for this is Zend_Form_Decorator_ViewHelper::render() calls the View helper in the following way:

<pre class="highlight">
// Zend/Form/Decorator/ViewHelper.php : 241
$elementContent = $view->$helper($name, $value, $attribs, $element->options);

The rest of optional function parameters will never be called.


Posted by Artur Bodera (joust) on 2009-01-22T04:41:32.000+0000

Well, apparently $element->setSeparator() does the trick. I was too deep in the code to notice that. A bit quirky, but works.

Posted by Matthew Weier O'Phinney (matthew) on 2009-01-22T05:06:55.000+0000

Closing per request from reporter.

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.