Extjs Combox提交后取不到value值...只能取到text值...請大家幫忙解決下.謝謝!

阅读更多
我的Combox代碼如下:
    var productsStore=new Ext.data.Store({
    	proxy:new Ext.data.HttpProxy({url:"system/module/type/data/getAllType.php"}),
    	reader:new Ext.data.JsonReader({root:'root'},
    									[{name:'productstype_id'},{name: 'productstype_name'}]
    								  )  
    });
    //productsStore.load();
    var productsType = new Ext.form.ComboBox({
        store:productsStore,
        fieldLabel: '所屬種類',
        name: 'txtProductsType',	
		emptyText: '請選擇產品種類',
		mode: 'remote',
		triggerAction: 'all',
		valueField: 'productstype_id',
		displayField: 'productstype_name',		
		allowBlank: false
    });

現在有個問題,我提交到后臺處理時.txtProductsType取到的是'productstype_name' 而不是'productstype_id',大家幫忙解決下...謝謝!

你可能感兴趣的:(extjs,combox)