Hi,
It seems like the <optgroup> tag only accepts 2 attributes:

Zend\Form\View\Helper\FormSelect.php [Line:61]
protected $validOptgroupAttributes = array(
        'disabled' => true,
        'label'    => true,
    );

Is there a way to add a valid HTML5 global parameter to it?
for example:
..array(
        'label' => 'Optgroup Label',
        'options' => array(...options...),
        'attributes' => array(
                *'class' => 'optgroup-class'*,
        ),
),

As per the following doc:
http://www.w3.org/TR/html-markup/optgroup.html
Permitted attributes: * global attributes
<http://www.w3.org/TR/html-markup/global-attributes.html>  * & label &
disabled

Thanks!
Roman.




--
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/ZF2-3-3-FormSelect-optgroup-doesn-t-accept-HTML5-attributes-tp4662326.html
Sent from the Zend Framework mailing list archive at Nabble.com.

-- 
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to