View Full Version : How to create a form with multiple fields on the same line
22 May 2010, 7:49 AM
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
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.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.