Login | Forgot password | Register

X

What is OpenID?

OpenID is an Internet-wide identity system that allows you to sign in to many websites with a single account.

With OpenID, your ID becomes a URL (e.g. http://username.myopenid.com/). You can get a free OpenID for example from myopenid.com.

For more information visit the official OpenID site.

Jump to:

17480 Posts in 4474 Topics by 1973 members

Archive

SilverStripe Forums » Archive » Form Field Position

Our old forums are still available as a read-only archive.

Page: 1
Go to End
Author Topic: Form Field Position 827 Views
  • Mohan
    avatar
    Community Member
    19 posts

    Form Field Position Link to this post

    Hi all,

    I have two form fields and want to position the fields horizontally instead vertically
    which is by default.
    Can anyone tell me how to do it?

    example
    form field1 form field2

    Thanks in advance

    Mohan

  • willr
    avatar
    Moderator
    1823 posts

    Re: Form Field Position Link to this post

    You can just float the divs / inputs left within CSS. Each Form element has tons of excess code you can tap into!

  • Sean
    avatar
    Core Development Team
    482 posts

    Re: Form Field Position Link to this post

    Alternatively, you can wrap the elements in the FieldGroup object, which doesn't wrap each element with a container div, so the elements fall inline to eachother.

    For example:

    new FieldGroup(
       new TextField('Name'),
       new EmailField('Email')
    );

    827 Views
Page: 1
Go to Top

Currently Online: JoshuaLewis

Welcome to our latest member: marcusl

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.