View Full Version : [CLOSED] Adding submit button to FormPanel challenge

2 Mar 2012, 1:04 AM
There seems to be no way to properly add a cancel and submit button to a form panel. When adding buttons, they are added to the items list. However, I cannot find a way to add buttons to the button list. This causes a layout challenge and simply does not look right when looking at the form.

"items": [
"xtype": "button",
"text": "MyButton"

instead of:
// Reset and Submit buttons
buttons: [{
text: 'Reset',
handler: function() {
}, {
text: 'Submit',
formBind: true, //only enabled once the form is valid
disabled: true,
handler: function() {
var form = this.up('form').getForm();
if (form.isValid()) {
success: function(form, action) {
Ext.Msg.alert('Success', action.result.msg);
failure: function(form, action) {
Ext.Msg.alert('Failed', action.result.msg);

2 Mar 2012, 9:23 AM
Add a toolbar to your panel
Set dock to bottom
Set ui of toolbar to 'footer'
Add Submit and Cancel buttons

2 Mar 2012, 10:43 AM
That works - thanks!