function webform_fieldset_prerender in Webform 7.4
Same name and namespace in other branches
- 6.3 components/fieldset.inc \webform_fieldset_prerender()
- 7.3 components/fieldset.inc \webform_fieldset_prerender()
Pre-render function to set a unique fieldset class name.
1 string reference to 'webform_fieldset_prerender'
- _webform_render_fieldset in components/
fieldset.inc - Implements _webform_render_component().
File
- components/
fieldset.inc, line 77 - Webform module fieldset component.
Code
function webform_fieldset_prerender($element) {
$element['#id'] = NULL;
$element['#attributes']['class'][] = 'webform-component--' . str_replace('_', '-', implode('--', array_slice($element['#parents'], 1)));
return $element;
}