View Full Version : FormPanel and multiple columns

2 Feb 2010, 4:47 AM

I would like to use formPanel but with columns. Right now I have following code:

var simpleForm = new Ext.FormPanel ({
labelWidth: 180,
title: '',
bodyStyle:'padding:5px 5px 0',
width: 500,
layout: 'table',
layoutConfig: {columns: 4},
defaults: {layout: 'form', border: false},
//defaults: {width: 250},
defaultType: 'textfield',

code used this way creates columns but without labels. I may create labels manually but then I almost double my code (another problem for me is formatting labels to have font size different).
When part of code is modified to this:

layout: 'table',
// layoutConfig: {columns: 4},
// defaults: {layout: 'form', border: false},
defaults: {width: 250},

it seems to be working perfectly but without columns.

Could you please advice what to do in this case.

1 Aug 2012, 5:01 AM

When you use 'table' layout for your 'simpleForm', you can not use fieldLabel property. Because fieldLabel is only used when your components rendered by a container which have 'form layout'.