webform

10 Feb

Take What You Can Get

in drupal, theme, webform
article image

You don't have to re-invent the wheel. Sometime a theme, module, or core will provide you with some great little "additions" you can use to improve your site. In this example, I am going to share a little cut and paste I did to improve (IMHO) my webform.

Here's how it looked before

formbefore.png
You'll notice that I used the header section of the webform to let the end user know that the form has some required fields, and that those fields are designated by the star (asterisk).
Good WebDeveloper :)
Let's take this one more step.

Embed Webform (or node) into a Node

in drupal, node_load, node_view, webform

<?php
$node
= node_load($nid);
$node->title = NULL;
print
node_view($node);
?>

<?php
$node
= node_load(1);
$node->title = NULL;
print
node_view($node);
?>

First example shows the ($nid) that needs to be replaced for use.