How to set custom data attbributes with zend form select? -


i using zend_form_element_select create select form element. here's how inner html rendered:

<option value="9" label="biscuits">biscuits</option>     <option value="10" label="scones">scones</option> <option value="11" label="cakes">cakes</option> 

now, want able include custom data attribute, data-qty, each option, per following example:

<option value="9" label="biscuits" data-qty="27">biscuits</option>   <option value="10" label="scones" data-qty="12">scones</option> <option value="11" label="cakes" data-qty="21">cakes</option> 

i can't see way out of box think i'll need extend select element, create new decorator, or such solution. ideas?


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

How can I fetch data from a web server in an android application? -

jquery - How can I dynamically add a browser tab? -