ExtJS:如何提交:combobox值和文本 [英] ExtJS: How to submit both: combobox value and text
本文介绍了ExtJS:如何提交:combobox值和文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
ExtJS:如何使用standardSubmit提交combobox值和文本?
ExtJS: How to submit both: combobox value and text using standardSubmit?
推荐答案
要提交valueField, a hiddenName
创建一个隐藏的输入字段来保存valueField的值。您还必须将 submitValue
设置为true
To submit the valueField, you must specify a hiddenName
to create a hidden input field to hold the value of the valueField. You must also set submitValue
to true
例如
var unitField = new Ext.form.ComboBox({
id:'unitField',
name: 'unit',
submitValue : true,
fieldLabel: 'Unit',
store:unitStore,
mode: 'remote',
displayField: 'name',
valueField: 'id',
hiddenName : 'unitId',
allowBlank: false,
anchor:'95%',
triggerAction: 'all'
});
所以你得到的值以unitId形式发送,文本以单位形式发送
So you get the value sent as unitId and the text as unit
这篇关于ExtJS:如何提交:combobox值和文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文