You are here

function webform_get_cid in Webform 5.2

Same name and namespace in other branches
  1. 5 webform.module \webform_get_cid()
  2. 6.3 webform.module \webform_get_cid()
  3. 6.2 webform.module \webform_get_cid()
  4. 7.4 webform.module \webform_get_cid()
  5. 7.3 webform.module \webform_get_cid()

Given a form_key and a list of form_key parents, determine the cid.

Parameters

$node: A fully loaded node object.

$form_key: The form key for which we're finding a cid.

$parent: The cid of the parent component.

2 calls to webform_get_cid()
_webform_client_form_submit_flatten in ./webform.module
Flattens a submitted form back into a single array representation (rather than nested fields)
_webform_client_form_submit_process in ./webform.module
Post processes the submission tree with any updates from components.

File

./webform.module, line 2196

Code

function webform_get_cid(&$node, $form_key, $pid) {
  foreach ($node->webform['components'] as $cid => $component) {
    if ($component['form_key'] == $form_key && $component['pid'] == $pid) {
      return $cid;
    }
  }
}