safetypin icon

Untitled

safetypin | PRO | 10/04/16 03:39:43 AM UTC | 0 ⭐ | 290 👁️ | Never ⏰ | []
PHP |

370 B

|

None

|

0 👍

/

0 👎

<?php
 
function _webform_component_mapping($node) {
  $mapping = array();
  $components = $node->webform['components'];
  foreach ($components as $i => $component) {
    $key = $component['form_key'];
    $mapping[$key] = $i;
  }
  return $mapping;
}
 
$mapping = _webform_component_mapping($node);
$submission->data[$mapping['newsletter_signup']][0]) == 'YES';

Comments