nani1216
nani1216

Reputation: 21

ExtJS combo-box value field

I'm using ExtJS in CodeIgniter (a PHP framework)

I want to store the valueField of a combobox in a database. I set displayField:'name', valueField:'id' for the combobox, but when i used $this->input->post(combofield name); it is returning the displayField instead.

How am I able to get the valueField?

Upvotes: 2

Views: 3125

Answers (3)

Ej DEV
Ej DEV

Reputation: 202

Put this on your properties:

    displayField:'state',
    valueField: 'id', 
    hiddenName: "id",

Upvotes: 0

Bikash Sahoo
Bikash Sahoo

Reputation: 95

I have no knowledge of PHP; but i guess you want to post the data as of valueField but displayField is being posted instead. If yes, then i would request you to check the name property and id property as well with anyother form fields for it's uniquness.

Upvotes: 0

Darren
Darren

Reputation: 11021

You have to set the hiddeName property or else it will send the displayField value not the valueField. Make sure you name it differently than the displayField.

Upvotes: 4

Related Questions