2
votes

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?

3

3 Answers

4
votes

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.

0
votes

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.

0
votes

Put this on your properties:

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