Results 1 to 3 of 3

Thread: Action.submit and Combobox

  1. #1
    Ext User
    Join Date
    Jun 2008
    Location
    Saltillo, Mxico!
    Posts
    12
    Vote Rating
    0
      0  

    Default Action.submit and Combobox

    Hi there

    I have this Combobox inside a FormPanel with api defined with an ext.direct function

    Code:
    {
                        xtype:'combo',
                        id:"forma_pago",
                        fieldLabel: 'Forma de pago',
                        editable: false,
                        store: new Ext.data.SimpleStore({
                                fields: ['opcion1', 'opcion2'],
                                data: [
                                    ['0', 'Efectivo'],
                                    ['1', 'Cheque'],
                                    ['2', 'Tarjeta'],
                                    ['3', 'Traspaso']
                                ]
                            }),
                        name: 'forma_pago',
                        valueField:'opcion1',
                        displayField: 'opcion2',
                        typeAhead: true,
                        mode: 'local',
                        anchor:'95%',
                        selectOnFocus:true,
                        triggerAction: 'all', // Muestra todas las opciones del combobox
                        emptyText:'Seleccione una forma de pago...'
                    }
    The problem I have is when I submit the Form, is that the value sent by the form is the displayField (opcion2) when the value that must be sent is opcion1. What could be the problem?


    Best regards
    Miguel Gonzlez

  2. #2
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,487
    Vote Rating
    146
      0  

    Default

    You forgot to specify a hiddenName in your ComboBox configuration.
    Aaron Conran
    @aconran

  3. #3
    Ext User
    Join Date
    Jun 2008
    Location
    Saltillo, Mxico!
    Posts
    12
    Vote Rating
    0
      0  

    Default Many thanks

    yes, it works.

    Many thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •