• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

[HELPED] Form displayfield label For Empty Form Fields

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [HELPED] Form displayfield label For Empty Form Fields

    I have a form with several field sets, arranged in table layout with varying columns:

    Code:
       var fieldSetInvoice = new Ext.form.FieldSet({
            id: 'fieldSetInvoice',
        	border: true,
        	height: 210,
        	width: 580,
        	title: 'Invoice Details',
        	iconCls: 'tag_blue',
        	labelWidth: 110,
        	items: [{
            	xtype: "fieldset",
        		autoHeight: true,
        		layout: "table",
        		layoutConfig: {
        			columns: 4
        		},
        		border: false,
        		style: 'padding: 0; margin: 0;',
        		items: [{
            		layout: "form",
        			width: 90,
        			items: [{
        				xtype: 'displayfield',
        				id: 'storeNbr',
        				fieldLabel: 'Store No.'
        			}]
    ....
    Using the code above, if storeNbr is blank (empty), the fieldlabel appears to have dropped down into space where the field value should show. Is there a way to get ExtJS to display a &nbsp so that the fieldlabel stays up above the empty field?

    Here is what it looks like:

    emptyformfield.JPG
    Last edited by rkanemeier; 04-27-2012, 10:08 AM.

  • #2
    Your code shows that you are creating a fieldset and the first item in your fieldset is another fieldset. Really your first item should probably be a xtype:"container". Not sure if this is related to your problem but I would try changing that first.

    Comment

    Working...
    X