function _webform_render_mapping in Webform Bonus Pack 6.3
Same name and namespace in other branches
- 7.3 components/mapping.inc \_webform_render_mapping()
Implementation of _webform_render_component().
File
- components/
mapping.inc, line 129 - Webform module mapping component.
Code
function _webform_render_mapping($component, $value = NULL, $filter = TRUE) {
$element = array(
'#type' => 'hidden',
'#title' => $filter ? _webform_filter_xss($component['name']) : $component['name'],
'#default_value' => $filter ? _webform_filter_values($component['value']) : $component['value'],
'#weight' => $component['weight'],
);
if (isset($value[0])) {
$element['#default_value'] = $value[0];
}
return $element;
}