PDA

View Full Version : FormPanel and multiple columns



lormitto
2 Feb 2010, 4:47 AM
Hi

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



var simpleForm = new Ext.FormPanel ({
labelWidth: 180,
url:'exeAdd.php',
frame:true,
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.

sword-it
1 Aug 2012, 5:01 AM
Hi,


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'.