Submitted by Will (not verified) on Mon, 02/01/2010 - 07:34.
Thanks loads to both of you for posting this information. It has helped me out massively.
One thing that confused me for a while was that in my example I was using multi select check boxes. It seems that in this case webform puts an additional form value into the mix. In my example I had to use the following code to get this working:
<?php if ($form_values['submitted_tree']['webform_component_name']['webform_component_key']=="webform_component_key") { $node->webform['additional_emails'][] = "orders@example.com"; } ?>
Where webform_component_name is the name you've given to the specific webform checkbox element, and webform_component_key is what you've named that option's key.
Just thought I'd post this for any other beginners like me, hopefully it'll save you the 2 hours I've just spent working this out! :)
Hello! My name is Eric Weik. I am a computer scientist, photographer, musician, and occasional blogger. New Rivers Digital is my software consulting business. I am dedicated to using open source software and open data standards for Web development and applications integration. In particular, I am an ardent Drupal fan and specialize in Drupal module development, theming, and data architecture integration.
Reply to comment
#1 Thanks loads to both of you
Submitted by Will (not verified) on Mon, 02/01/2010 - 07:34.
Thanks loads to both of you for posting this information. It has helped me out massively.
One thing that confused me for a while was that in my example I was using multi select check boxes. It seems that in this case webform puts an additional form value into the mix. In my example I had to use the following code to get this working:
<?phpif ($form_values['submitted_tree']['webform_component_name']['webform_component_key']=="webform_component_key") {
$node->webform['additional_emails'][] = "orders@example.com";
}
?>
Where webform_component_name is the name you've given to the specific webform checkbox element, and webform_component_key is what you've named that option's key.
Just thought I'd post this for any other beginners like me, hopefully it'll save you the 2 hours I've just spent working this out! :)
Thanks again
Reply
About
Hello! My name is Eric Weik. I am a computer scientist, photographer, musician, and occasional blogger. New Rivers Digital is my software consulting business. I am dedicated to using open source software and open data standards for Web development and applications integration. In particular, I am an ardent Drupal fan and specialize in Drupal module development, theming, and data architecture integration.
Contact Details
Lancaster, VA 22503
Content Tags
Abstract B&W Celestial Clouds Drupal 6 Drupal Recipes Drupal Sites Estuary Etsy Government Grasses HDR Long Exposure Macro New Rivers Digital Orton Photoblog Photo Expedition Photoset Renderblog RGB Sketchbook Snow Storm Structure Synth Sunflow Sunset Theming Webform.module Wide Angle Zen Zen ThemingRecent comments
Popular content
Today's:
All time:
Activity Stream
Sun, 01/29/2012 - 22:31
Mon, 01/16/2012 - 10:43
Fri, 01/06/2012 - 07:54
Powered by Drupal & Genesis | Valid XHTML 1.0 Strict |
RSS Feed
© 2010 New Rivers Digital | PO Box 784 | Lancaster, Virginia 22503 | +1-804-577-8526 | Contact Form