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

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

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -