I've inserted a webform in a node's template like so:

<?php print render($content['webform']); ?>

and created the webform in the admin panel for that page. The form shows up fine and I've styled it correctly. I would now like to know the Drupal way of grabbing the data from the form. Most likely a preprosses function from what I've researched.

The form is very simple, just an email address and a submit button. I'm good with PHP but still getting used to drupal's backend functionality. Any help or direction is greatly appreciated. Cheers!

  • Update - I've noticed there is a admin section in the webform panel that allows me to send it to an email address. However, I would still like to know how to do this manually with some type of function. As ill also have to send another email out to the user. Commented Dec 29, 2011 at 12:15

1 Answer 1


I am not clear about your question. But here is the answer from what i understood.

Try creating a new module and use the hooks to process the data http://api.drupalize.me/api/drupal/group/webform_hooks/7

  • Thanks, I would like to learn that way for sure but think it might be a bit overkill for now given my current knowledge of Drupal. To make it simpler, I'd like to put a very simple form on a page. Grab the information from the form, and send it to the webmaster and the user. Cheers. Commented Dec 29, 2011 at 12:55
  • 2
    @James Billings - By default the webform has options for doing it. check its options.
    – Hacker
    Commented Dec 29, 2011 at 13:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.