1. #1
    Ext User
    Join Date
    Jun 2008
    Location
    Saltillo, México!
    Posts
    12
    Vote Rating
    0
    migolo is on a distinguished road

      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 González

  2. #2
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,485
    Vote Rating
    135
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      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, México!
    Posts
    12
    Vote Rating
    0
    migolo is on a distinguished road

      0  

    Default Many thanks

    yes, it works.

    Many thanks!

Thread Participants: 1