PDA

View Full Version : Setting valueField For comboBox



NorthernLights
18 Jun 2015, 1:25 AM
Here's the problem I have guys...

I'm sending a JSON array to an Ext.js JavaScript file and trying to set the displayField and valueField with the two key value pairs returned.

I tried this and it did not work. However, once I set the displayField and valueField with the same values (the valueField value) it posted the data back to the PHP file fine.

I know I'm missing a few steps here but if you need samples just ask and I'll post as I'd like to bottom this out.

Thanks.

Gary Schlosberg
18 Jun 2015, 3:07 PM
It would help if you could post your code so we can see what might be causing the problem.
https://fiddle.sencha.com/#home

Here's an example with a combobox, though using XML:
http://dev.sencha.com/deploy/ext-3.4.0/examples/form/xml-form.js

NorthernLights
18 Jun 2015, 10:26 PM
I think this will work:
https://fiddle.sencha.com/#fiddle/p25

I'd really like to know what it is I'm missing here as setting the value & display fields separately from the JSON array is pretty important.

I've already tried setting the valueField for the DepartmentHeadUserID to 'Id' with no joy.

Any help greatly appreciated.