7 Replies Latest reply on Dec 7, 2008 10:17 PM by aruvasavi

    Form component

    aruvasavi Level 1
      Hi

      I have problem in aligning form input and label!!
      How can I align them side by side!!! all form component inputs are aligning one below the other?
      How can I do it??

      Thanks in advance
      Aruna
        • 1. Re: Form component
          gallaharsha
          I think the direction field for the formitem is set to vertical.
          In the formItem set direction to horizontal and this will solve your problem...
          • 2. Re: Form component
            aruvasavi Level 1
            Hi

            I tried I dint get it!!
            If I give direction also its aligning one below the other :(
            If possible send me code of that!!

            Thanks
            Aruna
            • 3. Re: Form component
              gallaharsha Level 1
              Hello,
              do you have any style sheets attached to your mxml file..
              may be some of the declarations in your css file are troubling you..
              check it out..
              • 4. Form component
                gallaharsha Level 1
                When you create a form,
                Drag the form on to the editor window.
                then drag a label into the form which gives you 2 labels,
                delete the right most one and you will be left with one.
                If you see the code you can see formitem created
                Now drag a textinput into the label you already dragged, when u drag it u get a blue indicator line to position your textinput. Dont position it when indicator line is above or below the label you have added. Position it when you get blue indicator line in line with the already added label.
                And for your information here the code of a simple form:



                You can see in the above code for the form item label="Refresh Rate" I have given direction horizontal so that all the containers within that formitem are positioned horizontally..so label, numeri stepper and another label come in a single line aligned horizontally...
                Hope this solves your issue

                • 5. Re: Form component
                  aruvasavi Level 1
                  Hello Harsha

                  Actually I wanted like as below...

                  Login Name: Text Input Password: Text Input

                  I want Login Name and Password in the same line...Both should be side by side..

                  Hope u got my question!!

                  Thanks
                  Aruna
                  • 6. Re: Form component
                    gallaharsha Level 1
                    Hello,
                    i didn't get u well in my previous reply.
                    I think you cant do that in a form but there is a way to tacklet it. Try this out...
                    Do not give the form tags and u can use the fields from the id's give to the text input fields
                    In case you have an issue reply back
                    • 7. Re: Form component
                      aruvasavi Level 1
                      Hello Harsha

                      Actually I am using like this only without form tags...But I thought we have to use form tags form form items so I raised a question in forum...
                      Thanks for the information...

                      Thanks and Regards
                      Aruna