Clodoaldo Neto
Clodoaldo Neto

Reputation: 125524

Extjs values not submitted

When submitting a form with Extjs I can see the form items have values with this code just before the submit:

    var itemsForm = '';
    function mostraItems(item, index, length) { itemsForm += item.id + ':' + item.name + ':' + item.value + ':' + index + '\n'; }
    myForm.form.items.each(mostraItems);
    alert (itemsForm);
    myForm.form.submit({...

But when the request arrives at the handling page the form items are not there. I can see the request details with Firebug.

One of the form items is a ComboBox:

    var myCombo = new Ext.form.ComboBox({
    //autoWidth: true,
    width: 250,
    displayField: 'theFieldText',
    editable: false,
    emptyText: 'Select something ...',
    fieldLabel: 'Some text',
    listeners: { 'select': { fn: theOnSelect, scope: this} },
    mode: 'local',
    selectOnFocus: true,
    store: theStore,
    triggerAction: 'all',
    typeAhead: true,
    valueField: 'theFieldValue'
});

This is Extjs 2.1

Upvotes: 1

Views: 2066

Answers (1)

CrazyEnigma
CrazyEnigma

Reputation: 2844

You need to specify the "name" property in order to map the control to a form name-value pair.

Upvotes: 1

Related Questions