PDA

View Full Version : space between field set items in form panel



javapurna
23 Apr 2013, 3:39 AM
hi every one ,


my form contains tow field sets . how to default space apply to items in between items.

my code is


var contactForm=Ext.create('Ext.form.Panel', { bodyPadding: 5,
cls: 'vertbuttons',
fieldDefaults: {
msgTarget: 'under',
anchor: '100%',
labelWidth: 100
},
layout: {
type: 'vbox',
pack: 'start',
align: 'stretch'
},
items: [{
xtype: 'fieldset',
title:'Information',
collapsible: false,
autoHeight: true,
fieldDefaults: {
msgTarget: 'under',
},
items: [{
xtype: 'fieldcontainer',
combineErrors: true,
msgTarget : 'side',
defaults: {
flex: 1,
hideLabel: false
},
layout: {
type: 'hbox',
pack: 'start',
align: 'stretch'
},
items:[{
Item1
},{
Item2
}]
}]
},{
xtype: 'fieldset',
title:'Information',
collapsible: false,
autoHeight: true,
fieldDefaults: {
msgTarget: 'under',
},
}]
});

I AM USING xtype:'fieldcontainer' ,items in field set there is no space

slemmon
24 Apr 2013, 3:02 PM
In your fieldDefaults try:
margin: '10 0 0 0'

http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.form.field.Text-cfg-margin

javapurna
24 Apr 2013, 8:10 PM
thank very much slemmon.

i have one more question in my form panel contains two field sets . and each field set contains two to three fieldcontainers with vbox,hbox layout . if am submit a form all data will send to server or not .

slemmon
25 Apr 2013, 3:17 PM
Yes, all of the form fields in the fieldcontainers / fieldsets will be sent on a form submit.