Ext.form.ComboBox does not send valueField just a displayField

I have a ComboBox in CMP where the value displayField is sent instead of valueField when submitting the form. How do I change this?

After selecting ‘Article_Title_1’ in the URL there is ...registration_id=Article_Title_1 and I would like it to be ...registration_id=57

           var combo = new Ext.form.ComboBox({
                renderTo: 'here',
                width:400,
                name: 'registration_id',
                id: 'registration_id',
                triggerAction: 'all',
                lazyRender:true,
                mode: 'local',
                store: new Ext.data.ArrayStore({
                    id: 0,
                    fields: [
                        'value',
                        'optionName'
                    ],
                    data: [['57', 'Article_Title_1'],['56', 'Article_Title_2']]
                }),
                emptyText: 'Choose...',
                valueField: 'value',
                displayField: 'optionName'
            });

Not sure why, but it seems to work as required when adding the property hiddenName:

hiddenName: 'registration_id',
...

Yes, it works! But it is strange and illogical. Thanks for your help!

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.