By Qudsiyya on
Hi,
I am working on a website for a travel agency.
I am using webform module for hotel bookings, car rentals and travel plan etc. I am trying to achieve the following layout for one for the forms.
Origin Destination Stay
TextBox Textbox Textbox
TextBox Textbox Textbox
TextBox Textbox Textbox
TextBox Textbox Textbox
I am not able to have only the labels at the top and attached to multiple text fields arranged in columns.
Can anyone help me in this regard.
Qudsiyya
Comments
Forms API
If you want to be able to do this with the degree of control, you might want to look at Form API. You can create a form through the API and add wrappers around each element, label, and each group so that you can use CSS to control the layout of your form. The only drawback is that you will need to write any validation and submit code to store the information and redirect the form. I'm not sure if CCK or other modules allow for this degree of control but I've used Form API to do simple things like this.
No other way?
Hi,
Thank you for your suggestion. What I have understood browsing through the forms API guide is that it requires some coding. Unfortunately I am not a php person. Is there any other way to achieve my goal?
Looking forward to your response.
Qudsiyya
Webform
You could try Webform. I haven't used it, but it could work for you.
http://drupal.org/project/webform
I know this post is old...
If you haven't figured it out, you can do this with webform.
After you have set up your form add this to the css and it should make it work like you want.
A word of caution, if you don't have a fixed width site, or fixed width fieldsets it will change the width of the form based on the size of the browser window. (if you are familiar with css you can fix this)
Note: you will have to change the client form id to the correct id
to do the "multiple text fields arranged in columns" with titles at the top use fieldsets. which are used to group your items together.