safetypin

Untitled

Oct 3rd, 2016
354
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.37 KB | None | 0 0
  1. <?php
  2.  
  3. function _webform_component_mapping($node) {
  4.   $mapping = array();
  5.   $components = $node->webform['components'];
  6.   foreach ($components as $i => $component) {
  7.     $key = $component['form_key'];
  8.     $mapping[$key] = $i;
  9.   }
  10.   return $mapping;
  11. }
  12.  
  13. $mapping = _webform_component_mapping($node);
  14. $submission->data[$mapping['newsletter_signup']][0]) == 'YES';
Advertisement
Add Comment
Please, Sign In to add comment