ZF-11540: Zend_Form_Element_Select generates non valid Xhtml code

Issue Type: Bug Created: 2011-07-08T14:24:58.000+0000 Last Updated: 2011-07-08T14:24:58.000+0000 Status: Open Fix version(s): Reporter: Maxim Postoronca (max4ever) Assignee: Christian Albrecht (alab) Tags: - Zend_Form

  • zend-form-element

Related issues: Attachments:


Zend_Form_Element_Select doesn't generate valid code

if i use $listini->addMultiOptions($listini_options);

with this array

Array ( [] => Qualsiasi Listino [listini_validi] => Array ( [1] => Listino Geografico 2011 )


i get this html code, which is not valid Qualsiasi Listino

<optgroup id="listino_id-optgroup-Listini validi: " label="Listini validi: ">
<option value="1" label="Listino Geografico 2011">Listino Geografico 2011</option>

with this error {quote} Line 696, Column 46: value of attribute "id" must be a single token


This attribute can not take a space-separated list of words as a value, but only one word ("token"). This may also be caused by the use of a space for the value of an attribute which does not permit it. {quote}

also this example seems to produce totaly wrong output,…

so i give up on trying to specify the id of optgroup, but the solution would be to strip the id optgroup of white spaces after zend form magicaly auto generates it


No comments to display

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.