Dear All,

I'm newbie at drupal and trying the webform module to create a contact form something like attached image which seems very simple but I find it difficult. I have the following issues:-

1. I want to place all the labels on left side and some space between label and field.
2. And I dont know how the hide the Label of one field.

I'm desprately looking for a solution. I dont have php coding experience so I really want someone to help me here in this community of great developers.

Thanks in advance.

Alice Kahn

CommentFileSizeAuthor
#1 sample_form.gif19.46 KBmlaw
sample-form.JPG23.79 KBalice-kahn

Comments

mlaw’s picture

StatusFileSize
new19.46 KB

It's all in your CSS. I'm currently using these CSS classes (in my style.css) to define the inline style that you are looking for.

.webform-component-select label, 
.webform-component-email label, 
.webform-component-textfield label, 
.webform-component-textarea label {
   float: left;
   margin-right: 1em;
   margin-top: 2px;
   text-align: right;
   width: 14.25em;
}


.webform-component-textfield label,
.webform-component-select label {
   display: inline;
   float: left;
}

You may want to adjust the width and margin spacing to get the look you want. Hope that helps.

alice-kahn’s picture

Hi mlaw,

This is exactly what I was looking for. Thanks alot for the help.

Keep up the good work!
Many greetings

mlaw’s picture

Priority: Critical » Normal
Status: Active » Closed (fixed)

Great glad I could help.