PDA

View Full Version : Button as a new field with fieldLabel



I'm Dennis
15 Dec 2011, 4:16 AM
I have a form panel and one of the fields should be a button with "Reset Password" text labeled as "Password"
Following code draws button, but does not draw label.


{
fieldLabel: 'Password',
xtype: 'button',
text: 'Reset Password',
width: 100,
handler: function() {
alert('reset password');
}
}

The result is following:
30045


Any suggestions?

Abetterse
15 Dec 2011, 4:19 AM
actos class action lawsuit, buy actos (http://www.india-forums.com/forum_posts.asp?TID=2222763), fda actos

I'm Dennis
15 Dec 2011, 4:24 AM
Solved with fieldcontainer


{
xtype: 'fieldcontainer',
fieldLabel: 'Password',
layout: 'hbox',
items: [
{
xtype: 'button',
text: 'Reset Password',
width: 100,
handler: function() {
alert('reset password');
}
}
]
}


Result:
30046