6 Replies Latest reply on Sep 18, 2008 10:11 AM by vikceo

    Form field alignment

    vikceo Level 1
      I have a form with four field arranged into two columns and two rows.
      by default label of formItem comes left aligned and field text right aligned.

      What i want is all field labels should come right aligned and text field shld come left aligned,

      I tried a lot fo textalignment property options but no luck..

      any idea how to achieve that?
        • 1. Re: Form field alignment
          EvolvedDSM Level 2
          So rather than the current setup of

          [Label] [Text Field Input Box]

          you want

          [Text Field Input Box] [Label] ?

          I'm pretty sure the above format is built into FormItem, so what you might want to do is manually add a Text Input field and Label without using FormItem. I don't know of another way.
          • 2. Re: Form field alignment
            vikceo Level 1
            nope sorry you got it wrong...

            its not about ordering of fields.. i am talking about alignment..

            other way to say it is:
            it is now appearing as:

            Vik testing
            Vivek abc

            what i want is:
            Vik testing
            Vivek abc


            i hope you got what i want?


            • 3. Re: Form field alignment
              Dexterous Level 1
              Hey, this is extermely simple.
              I think that you are defining new text fileds as lable for the field names also. But basically, the following you should be using. It will give the field names as right aligned and input boxes as left aligned:


              So instead of adding a separate label control, you can specify the label property for the formItem itself.

              HTH
              • 4. Re: Form field alignment
                vikceo Level 1
                no did u try running above code?

                it will show:
                User Name <text box>
                Password <textbox>

                so password will be aligned to left. What i want is the right alignment.

                • 5. Re: Form field alignment
                  EvolvedDSM Level 2
                  Your example is unhelpful

                  Vikceo writes:

                  it is now appearing as:

                  Vik testing
                  Vivek abc

                  what i want is:
                  Vik testing
                  Vivek abc


                  These are the exact same things. What would be helpful is if you got a screen shot of what your form currently looks like, and then another screen shot with arrows of where you want things aligned. Frankly I don't know what you are talking about. You wish to change the alignment of the Label? of the Text Box? *shrug* More info needed.
                  • 6. Re: Form field alignment
                    vikceo Level 1
                    ok last try before i upload a screenshot...

                    what now coming is for the form item label field::
                    Vik$$
                    Vivek

                    where $ represent a space. and what i want is:
                    $$Vik
                    Vivek

                    is it clear?