View Full Version : can i change the form layout

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)

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

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

Good Luck!

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


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

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