Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive

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

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Form Field Position


Reply

3 Posts   1980 Views

Avatar
Mohan

4 June 2008 at 10:01pm (Last edited: 4 June 2008 10:01pm), Community Member, 19 Posts

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

Avatar
Willr

13 June 2008 at 5:10pm Forum Moderator, 5511 Posts

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

Avatar
Sean

15 July 2008 at 6:29pm (Last edited: 15 July 2008 6:29pm), Forum Moderator, 921 Posts

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')
);