function _webform_validation_get_component_type in Webform Validation 6
Same name and namespace in other branches
- 7 webform_validation.module \_webform_validation_get_component_type()
Given a webform node, get the component type based on a given component key
1 call to _webform_validation_get_component_type()
- webform_validation_get_field_keys in ./
webform_validation.module - Recursive helper function to get all field keys (including fields in fieldsets)
File
- ./
webform_validation.module, line 406
Code
function _webform_validation_get_component_type($node, $component_key) {
if ($node->webform['components']) {
foreach ($node->webform['components'] as $component) {
if ($component['form_key'] == $component_key) {
return $component['type'];
}
}
}
return FALSE;
}