pass cck email value to webform block I currently have 2 webforms displayed on a page - these are inserted dynamically from a node.tpl.php file.

However, I also have a cck field on the current node for an email address - I would like to be able to pass this email value directly to the "Email To" field of the webform.

This would create a new email recipient depending on which node you were viewing. For example:

The "About Us" page contained the field "email: hello@mydomain.com" - therefore the webform loaded in the sidebar would be sent to this address.

The "Location" page contains the field "email: location@mydomain.com" - now this would be the email address that receives any submissions from that page.

The idea is to have 1 webform and dynamically change the email its sent to based on a cck field. Is this possible at all?

Thanks,
Garry.
In your webform add an "email field" for the recipient (say email_recipient).
Go to node/123/webform/emails to set the recipient to be your previously created field.
Create a hook_form_alter to put the email address you your webform field.

&lt;?php
function CUSTOM_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  //you need to set up a CUSTOM module to store this.
  //use devel with dsm($form); to figure the name of each field
  if ($form['#id'] == 'webform-client-form-123') {
    //load the node from the url
    if (arg(0) == 'node' &amp;&amp; is_numeric(arg(1))) {
      $node_email = node_load(arg(1));
      //set your webform field to your email
      $form['submitted']['con_email_recipient']['#default_value'] 
           = $node_email-&gt;field_email_recipient[0]['value'];
    }
  }
}
?&gt;



Add some CSS to hide the field, and it should work, code untested but I'm pretty confident about the steps, also have a look at Working with Default Values.