PDA

View Full Version : can i change the form layout



Danielincci
28 Aug 2009, 3:01 PM
Hi everybody, im newbie using ExtJs and i have a little problem, i want to show 2 texbox together in the same row of the form but i cant change the layout.
I try (inside the form code)

layout:'column',
items: [
{columnWidth:.5, layout:'form', items: [{fieldLabel: 'Number', name: 'number', allowBlank: false}]},
{columnWidth:.5, layout:'form', items: [{fieldLabel: 'Validator', name: 'validator', allowBlank: false, hideLabel : true}]}
]

but doesn't work

the API says "When nesting additional Containers within a FormPanel, you should ensure that any descendant Containers which host input Fields use the Ext.layout.FormLayout layout manager."
how can i change that?
help me please

fruitwerks
28 Aug 2009, 5:35 PM
have a look here http://examples.extjs.eu/?ex=formcol (http://examples.extjs.eu/?ex=formcol)

Good Luck!

jarlau
28 Aug 2009, 5:39 PM
you can take a look at this extension:

http://extjs.com/forum/showthread.php?t=33162&page=7

Condor
29 Aug 2009, 2:18 AM
Your code almost works. You only forgot to specify that the items are supposed to be textfields!


{
xtype: 'container',
layout: 'column',
defaults: {
columnWidth: .5,
xtype: 'container',
layout: 'form',
defaultType: 'textfield'
},
items: [{
items: {
fieldLabel: 'Number',
name: 'number',
allowBlank: false
}
},{
items: {
fieldLabel: 'Validator',
name: 'validator',
allowBlank: false,
hideLabel : true
}
}]
}

Danielincci
31 Aug 2009, 6:30 AM
The extension looks very good, but the solution of Condor is better
thank you for help me ;)