Before ill ask my question I sould mention that i read every post about this problem.
I am submitting my extjs form using: form.getForm().getValues() in an independent ajax request.
I cant submit my value (userManager_userId) in a combo to to the server:
new Ext.form.ComboBox({
name: 'userManager_userName',
valueField: 'userManager_userId',
hiddenValue : 'userManager_userId',//I want to send this ti the server (Integer)
displayField: 'userManager_userName'
....
)}
The combo providing/submitting its display and not its value.
I should mention that when the for loads, I charge it with data from the server by using a Ext.data.JsonReader
Thanks
Update
So I did a little test for you to see live:
http://fatnjazzy.byethost8.com/
you can view source to see the js source.
Ill post it here when we are done.
Now it is working but the form does not initial its values.
Do you have
hiddenNameproperty set for your combo box?When you usehiddenValue, you need to make use ofhiddenName.hiddenValuejust sets the default value for the combo. By setting it you will not be able to send the value to the server side.Update: Since you are using separate Ajax request to submit the form, why are you using hidden field to store the values? you could access the value of the combo box from:
Another possible reason why your form.getForm.getValues() do not give the combo’s values will be due to having wrong value in
valueField. In your case you have userManager_userId. Is that your underlying data value name to bound to the ComboBox? Here is my example:Here the valueField’s value is bound to my store’s value field..