mingwong00
6 Sep 2007, 5:45 PM
I want to add the radio box into a form, but i don't how to make it into one row, just like pic 1.
And this is the code:
/*
* ================ Simple form =======================
*/
var simple = new Ext.form.Form({
labelWidth: 75, // label settings here cascade unless overridden
url:'save-form.php'
});
simple.add(
new Ext.form.TextField({
fieldLabel: 'aaa',
name: 'key_word',
width:255,
allowBlank:false
}),
new Ext.form.Radio({
value: '1',
fieldLabel: 'type',
name: "word_type",
boxLabel: "ID / ID2"
}),
new Ext.form.Radio({
value: '2',
name: "word_type",
boxLabel: "password"
}),
new Ext.form.TextField({
fieldLabel: 'Company',
name: 'company',
width:175
}),
new Ext.form.TextField({
fieldLabel: 'Email',
name: 'email',
vtype:'email',
width:175
})
);
simple.addButton('Save');
simple.addButton('Cancel');
simple.render('form-ct');
And this is the code:
/*
* ================ Simple form =======================
*/
var simple = new Ext.form.Form({
labelWidth: 75, // label settings here cascade unless overridden
url:'save-form.php'
});
simple.add(
new Ext.form.TextField({
fieldLabel: 'aaa',
name: 'key_word',
width:255,
allowBlank:false
}),
new Ext.form.Radio({
value: '1',
fieldLabel: 'type',
name: "word_type",
boxLabel: "ID / ID2"
}),
new Ext.form.Radio({
value: '2',
name: "word_type",
boxLabel: "password"
}),
new Ext.form.TextField({
fieldLabel: 'Company',
name: 'company',
width:175
}),
new Ext.form.TextField({
fieldLabel: 'Email',
name: 'email',
vtype:'email',
width:175
})
);
simple.addButton('Save');
simple.addButton('Cancel');
simple.render('form-ct');