How can one set and display a title above a webform that is embedded/added to a non-webform-node?
Now it just starts with the first field label at the end of the node content. That I would like to avoid by showing a title in between (E.g. "Request more information about this product").

Comments

quicksketch’s picture

Just put the title of the form in the body field by editing the webform node. The body of the node displays above the form.

Tino’s picture

Thank for the fast reply quicksketch!
That is indeed the most easy solution, but in my case it won't work because I have views attached to the same pages (using the views attach module). These attached views automatically appear above the webform, which is desired in this case. Putting a title in the footer of the view won't work either, because there is not always a webform below it.

If there's no solution within webform, we'll have to make things clear to the end user in het first field's label...

flipsidenz’s picture

Sorry to drag up an old thread, but does anyone have any other ideas on how to solve this? I have added webforms as accessible to page nodes, but cannot apply a title to the webform, which seems like a bit of an oversight.

My form is going to be above the content, so I can't place my heading into the Body...

quicksketch’s picture

Make a "Markup" component and place it at the top of the form. Put an <h2></h2> (or similar) in it.

flipsidenz’s picture

Do you have an example, or a link to an example of a "markup" component? Sorry, I'm not very experienced with Drupal and I am still coming to terms with a lot of terms.

quicksketch’s picture

Markup components are added just like every other component in Webform.

- Click the webform tab of your node
- Add a new component of type "Markup" (as opposed to a Textfield or Select options)
- Enter the HTML you want to display as the value of the markup field.
- Make sure you set the Input Format to Full HTML or some format that will display <h2></h2> tags.
- Save the component and place it at the top of your form using the drag and drop handles.

quicksketch’s picture

Status: Active » Closed (fixed)
Tino’s picture

Wonderful. Thanks for all the hard and continuous work on the Webform module quicksketch!