function _webform_validation_get_component_type in Webform Validation 7
Same name and namespace in other branches
- 6 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 - Helper function to get all field keys (including fields in fieldsets).
File
- ./
webform_validation.module, line 550
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;
}