ZF-8684: Zend_Form_Element_Multi's multi options don't support $options (htmlOptions) like all the other htmlelements in Zend_Form

Issue Type: Improvement Created: 2010-01-01T04:42:06.000+0000 Last Updated: 2011-04-02T22:18:36.000+0000 Status: Open Fix version(s): Reporter: Daco Harkes (dc.harkes) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Form

  • Zend_View

Related issues: Attachments:


With Zend_Form_Element_Multi->addMultiOption($option, $value) it is not possible to set html-options of those options you are adding. (And the

What i would want is being able to set the class or other html options of the options in a select. Like the view renderer can render options in almost any html-element used in the form. $option

Classes that need to be changed: Zend_Form_Element_Multi: allow (html)options to multiOptions instead of only a $option and a $value. addMultiOption($option, $value) to addMultiOption($option, $value, $options)

Zend_View_Helper_FormSelect: needs to render the html options.

Zend_View_Helper_FormRadio: same as Zend_View_Helper_FormSelect


Posted by Christian Albrecht (alab) on 2010-03-16T02:49:22.000+0000

See discussion about changes in Zend_Form 2.0

Posted by Martin (lolek19) on 2011-04-02T22:18:36.000+0000

My fix: [] Example with red background: $combobox = new Zend_Form_Element_Select('list'); $combobox->addMultiOption('value', 'visibleText', array('style'=>'background-color: #FF0000;'));

Have you found an issue?

See the Overview section for more details.


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

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