22 May 2010 7:49 AM #1
How to create a form with multiple fields on the same line
Can someone let me know how I can create a form panel with multiple fields on the same line, each field will require a label.
Currently I am using the property : Layout = Column, however I cannot show the labels on the left of the field, like when you have the layout = Form.
22 May 2010 8:08 AM #2
- Join Date
- Mar 2007
- Frederick, MD
- Vote Rating
If each field needs a label directly to its left, you can add a child Container to the FormPanel with a layout of "column" or "hbox", either one depending on what you need to accomplish. "column" would work fine, although you have better auto-sizing functions (e.g., flex) with the "hbox" layout. You just need to set "hideLabel" on the Container. Then, inside of the Container you would add 3 more Containers, each with the layout of "form". Finally inside of each Container, you can add your fields with their labels set.
Otherwise, if they don't need a label directly to the left, and can either have a "collective" label or simply a single label, look into the CompositeField, which automatically lays out fields horizontally in an inner hbox container.
See attached project file.
By big in forum Ext 3.x: Help & DiscussionReplies: 0Last Post: 6 Mar 2010, 12:41 AM
By Qtx in forum Ext 3.x: Help & DiscussionReplies: 1Last Post: 1 Oct 2009, 11:39 PM
By httpdotcom in forum Ext 2.x: Help & DiscussionReplies: 5Last Post: 1 Aug 2008, 6:04 AM
By jonathanv in forum Ext 1.x: Help & DiscussionReplies: 2Last Post: 21 Apr 2008, 4:03 PM
By bhomass in forum Ext 2.x: Help & DiscussionReplies: 6Last Post: 5 Dec 2007, 2:10 PM