Home > Web Front-end > JS Tutorial > The use of local hiddenfield_extjs for Form in Extjs4

The use of local hiddenfield_extjs for Form in Extjs4

WBOY
Release: 2016-05-16 17:12:27
Original
1072 people have browsed it
Copy code The code is as follows:

Ext.onReady(function(){
Ext.QuickTips. init();
Ext.create("Ext.form.Panel",{
title:'Local hiddenfield instance',
renderTo:'formDemo',
bodyPadding:'5 5 5 5 ',
height:100,
width:270,
frame:true,
defaults:{
labelSeparator : ": ",
labelWidth : 70,
width : 200,
allowBlank: false,
msgTarget : 'side',
labelAlign:'left'
},
items:[{
xtype:'textfield',
name:'name',
fieldLabel:'name',
value:'USPCAT.COM'
},{
xtype:'hiddenfield',
name:'age',
value:'1'
}],
buttons:[{
text:'Submit',
handler:function(){
this.up("form"). getForm().submit({//This refers to the current component (button), up is the previous component (form)
params:{
info:'age is a hidden field'
}
});
}
}]
});
})
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template