PDA

View Full Version : FormPanel - Submit Button and link on same line



iosoftgame
20 Aug 2009, 8:26 AM
Hello.

I have used the tutorial "Basic Login", http://extjs.com/learn/Tutorial:Basic_Login, to create a login form.

I have modified the following part of the code of "login.js":


...
items:[{
xtype: 'box',
autoEl: {tag: 'a', href: 'http://www.mywebsite.com/', target:'_blank', html: '<img src="images/logo.png" alt="" />'},
width: 285
},{
fieldLabel:'Brugernavn',
name:'loginUsername',
allowBlank:false
},{
fieldLabel:'Adgangskode',
name:'loginPassword',
inputType:'password',
allowBlank:false
},{
xtype: 'box',
//html:'<a href="help.php">Hjælp</a>'
autoEl: {tag: 'a', href: 'help.php', target:'_blank', html: 'Hjælp'}
}],

// All the magic happens after the user clicks the button
buttons:[{
text:'Log ind&nbsp;',
formBind: true,

iconCls: 'icon-login',
iconAlign: 'right',
...

My problem is that I can't make the submit button be on the same line as the hyperlink from the "box" item :-/

I have attached a few images to show what I'm having problem coding ;)