View Full Version : ComboBox question ...

25 Apr 2008, 6:01 AM
Hello all, I have a problem witch combo boxes. I have a form for submitting some data and this form working but combobox values not posted correctly. For example when i select a Class names 1. Class 2. Class etc. This combobox value need to post my url 1,2,3 ...
but my post value is Pre.Class 1. Class etc..

How can i solve this problem ?

Thank you..

Here is My Codes

var classses = [
['0', 'Pre.Class']
,['1', '1. Class']
,['2', '2. class']
,['3', '3. class']
,['4', '4. class']
,['5', '5. class']
,['6', '6. class']

var ClassStore = new Ext.data.SimpleStore({ fields: ['classNumber', 'classDescription'],data : classses}); // end Store

var addCourseForm = new Ext.form.FormPanel(

, new Ext.form.ComboBox({
fieldLabel : 'Course Classses'
,emptyText:'Please Select a Class'
,store : classStore
,mode: 'local'
,triggerAction: 'all'
,width : 50

25 Apr 2008, 6:28 AM
I dont understand what you are asking...

Please provide an example of the POST you are getting and the POST you want...


25 Apr 2008, 7:28 AM
Sorry my English :)

i'm trying explain again ...

i have a combobox in my Ext.form.FormPanel . i create this combobox dynamically. My form panel working good.But my problem is combobox's post value. Normally html selectboxes return "value" tag value. For Example
<select id="myid" name="mySelect">
<option value="1">First </option>

when we select "First" option and submit mySelect value = 1.

So i want to POST Ext.form.Combobox "value" tag value.Not displayField value.

when my Ext.form.Formpanel submitting, combobox value return display value but i dont want return
display value. For example when i was select 1.Class option in my combobox it must POST 1
not '1.Class'.

maybe i can explain this problem.. :)

thanks again..

26 Apr 2008, 8:59 AM
Try defining valueField and hiddenName properties (also check the displayField value):


27 Apr 2008, 9:53 PM
Thanks.... :)
it works perfectly :)