在我的表单中,我使用如下文本字段和单选组和按钮,
var radiogroup = new Ext.form.RadioGroup({
fieldLabel: 'Specimen ?',
allowBlank: false,
name:'isSpecimen',
anchor: '85%',
items: [
{
boxLabel: 'Yes',
name: 'radio',
inputValue: 'Y'
},
{
boxLabel: 'No',
name: 'radio',
inputValue: 'N',
checked:true
}
]
});
var createOrderForm = new Ext.FormPanel({
renderTo: "createOrder",
frame: true,
width: 500,
items: [
{
xtype: 'textfield',
fieldLabel: 'Instruction',
name: 'instruction',
width: 300,
allowBlank:false
},
radiogroup,
{
xtype : "textfield",
id : 'textfield1',
fieldLabel : "Type",
name : "type",
hidden:true,
width: 300,
disabled:true
}],
buttons:[{
text:'Create',
formBind: true,
listeners: {
click: function(){
Ext.Ajax.request({
url : url+'/lochweb/loch/order/persist',
params : createOrderForm.getForm().getValues(),
success : function(response){
console.log(response.responseText); //<--- the server response
window.location = url+'/lochportal/viewSuccessForm.do';
}
});
}
}
}]
});
当我单击创建按钮时,单选组名称和值未作为参数传递给 url,但其他控件名称和值正确传递。如何将单选组名称和输入值作为参数传递?