Hi,
I noticed that you are creating a hidden input and storing the valueField in that input. This works great if you will be submitting the form because you store the hiddenName. Is it possible to make the id of that hidden input the same as its name? This allows you to access the value by id which happens to be what I am doing.
I believe this should do the trick (located in Combo.js):
I would love to see this added into the library.
I noticed that you are creating a hidden input and storing the valueField in that input. This works great if you will be submitting the form because you store the hiddenName. Is it possible to make the id of that hidden input the same as its name? This allows you to access the value by id which happens to be what I am doing.
I believe this should do the trick (located in Combo.js):
onRender : function(ct){
Ext.form.ComboBox.superclass.onRender.call(this, ct);
if(this.hiddenName){
this.hiddenField = this.el.insertSibling({tag:'input', type:'hidden', name: this.hiddenName, id: this.hiddenName},
'before', true);
this.hiddenField.value = this.value;
}
...

|
#2
|
|
Actually, that didn't work for me. But I'm sure there is a master mind among you that can achieve what I am after.
![]() |
|
#3
|
|
Any chance of getting the value into the id of the hidden field?
![]() |
|
#4
|
|
Sorry to not respond. I already added it in, it will be in the next rev.
![]() |
|
#5
|
|
Thank you, this is a much appreciated addition.
![]() |
本文讨论了在ExtJS中如何将隐藏输入字段的ID设置为与其名称相同的问题。这有助于通过ID直接访问隐藏字段的值,对于使用ExtJS表单进行开发的人员来说是一个实用的技巧。
2135

被折叠的 条评论
为什么被折叠?



