PDA

View Full Version : Can a compositefield be within a fieldset? I get error 'c not defined' on render



JoyfulBobHome
23 Feb 2011, 2:13 PM
Here's my form code:


{
xtype:'fieldset',
//title: 'Addresses',
border: false,
collapsible: true,
autoHeight:true,
layout:'column',
width: 750,
items: [{
columnWidth:0.5,
id: 'addressesCol1',
layout: 'form',
border:false,
items: [ TAGNMfield, TAGA1field, TAGA2field, TAGA3field, TAGCIfield
{
xtype: 'compositefield',
id: 'compositefields1',
fieldLabel: 'Customer#',
labelWidth: 50,
items: [ COMNOfield, {xtype: 'displayfield', value: 'a', width: 10, style: {marginLeft: '5px', marginTop: '4px'}},
CUSNOfield, {xtype: 'displayfield', value: 'a', width: 10, style: {marginLeft: '5px', marginTop: '4px'}}
]},
CUSNOname, STRAIfield, SITSHfield, CUSPOfield, ACTNOfield ]
},{
columnWidth:0.5,
id: 'addressesCol2',
layout: 'form',
border:false,
items: [ SITINfield, INSSNfield, INSS1field, INSS2field, INSS3field ]
}]
}

I searched the forum, and tried Firebug to find c but no luck.

JoyfulBobHome
24 Feb 2011, 6:08 AM
FYI, I was able to use a container instead of a compositefield:


{
xtype:'fieldset',
//title: 'Addresses',
border: false,
collapsible: true,
autoHeight:true,
layout:'column',
width: 750,
items: [{
columnWidth:0.5,
id: 'addressesCol1',
layout: 'form',
border:false,
items: [ TAGNMfield, TAGA1field, TAGA2field, TAGA3field, TAGCIfield, TAGSTfield, TAGZPfield, TAGCNfield,
{
xtype: 'container',
layout: 'column',
fieldLabel: 'Co#/Customer#',
anchor : '-10',
defaultType : 'container',
defaults : {
width : 115,
//labelWidth : 5,
layout : 'form'
},
items: [
{
labelWidth : 5,
width : 35,
items : COMNOfield
},{
labelWidth : 5,
width : 95,
items : CUSNOfield
}
]},
CUSNOname, STRAIfield, SITSHfield, CUSPOfield, ACTNOfield ]
},{
columnWidth:0.5,
id: 'addressesCol2',
layout: 'form',
border:false,
items: [ SITINfield, INSSNfield, INSCOfield, INSPHfield, INSS1field, INSS2field, INSS3field,
INSSIfield, INSSSfield, INSSZfield, INSSCfield, INSFXfield, thdEADRfield,
LMNUPfield, LMNDTfield, SITORfield ]
}]
}