1. #1
    Sencha Premium Member
    Join Date
    Dec 2007
    Location
    Toronto
    Posts
    4
    Vote Rating
    0
    giovani is on a distinguished road

      0  

    Question How to create a form with multiple fields on the same line

    How to create a form with multiple fields on the same line


    Hello,

    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.


    tx!
    --
    Thanks,
    Giovani

  2. #2
    Sencha - Desktop Packager Dev Team jarrednicholls's Avatar
    Join Date
    Mar 2007
    Location
    Frederick, MD
    Posts
    1,747
    Vote Rating
    7
    jarrednicholls will become famous soon enough jarrednicholls will become famous soon enough

      0  

    Default


    Hi Giovani,

    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.
    Attached Files

Similar Threads

  1. create multiple store for multiple line in chart
    By big in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 6 Mar 2010, 12:41 AM
  2. Two fields in one line in the form layout
    By Qtx in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 1 Oct 2009, 11:39 PM
  3. Best method for multiple form elements on single line
    By httpdotcom in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 1 Aug 2008, 6:04 AM
  4. Form with two fields on the same line?
    By jonathanv in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 21 Apr 2008, 4:03 PM
  5. form fields don't line up in a panel
    By bhomass in forum Ext 2.x: Help & Discussion
    Replies: 6
    Last Post: 5 Dec 2007, 2:10 PM

Thread Participants: 1