1
當提交表單與ExtJS的,我可以看到的表單條目之前具有的值與此代碼的提交:ExtJS的值未提交
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({...
但是,當請求到達處理頁面的表單項目不那裏。我可以看到Firebug的請求細節。
一種形式的項目之一是一個組合框:
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'
});
這是ExtJS的2.1
我添加了名稱屬性,現在它顯示在請求的頁面上,而不是要分配的值字段分配的是valueField和displayField的總和。假設valueField是「1」,displayField是「一些文本」,那麼請求的內容是「1(某些文本)」,而不僅僅是valueField。不知道我是否應該爲此打開另一個問題或編輯此問題。 – 2010-07-22 17:46:57
您可以檢出hiddenField屬性。如果這是一個組合,隱藏的字段必須設置。 – CrazyEnigma 2010-07-22 19:45:00