http://framework.zend.com/issues/browse/ZF-4494


Themselves wrote:
> 
> Hi guys,
> 
> I'm trying to build some autocomplete dropdowns using Zend + Dojo, but I
> can't seem to work out how to get the select to submit the id and display
> the name. As per the documentation, a ComboBox submits the value of the
> label, so I've tried passing through JSON like this:
> 
> {"identifier":"label","items":[
>     {"label":"1","name":"aaaaaaa"},
>     {"label":"435","name":"bbbbbbbbbb"},
>     {"label":"209","name":"ccccccccccc"},
>     {"label":"3","name":"ddddddddd"},
>     {"label":"2","name":"eeeeeeeee"}
> ]}
> 
> Which displays the correct name in the drop down, but when you submit the
> form, it submits the name, not the contents of the label field. What is
> the
> correct JSON format for my autoComplete action helper to return to get
> this
> to work correctly? And once I have got this working correctly, I'm going
> to
> need to access the label value through javascript - Can I assume I'll be
> able to get it via comboBox.label in much the same way as I can get
> comboBox.value now?
> 
> 

-- 
View this message in context: 
http://www.nabble.com/JSON-format-for-ComboBox---FilteringSelect-tp20295920p20301734.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to