function _webform_render_markup in Webform 5
Same name and namespace in other branches
- 5.2 components/markup.inc \_webform_render_markup()
- 6.3 components/markup.inc \_webform_render_markup()
- 6.2 components/markup.inc \_webform_render_markup()
- 7.4 components/markup.inc \_webform_render_markup()
- 7.3 components/markup.inc \_webform_render_markup()
Build a form item array containing all the properties of this component.
Parameters
$component: An array of information describing the component, directly correlating to the webform_component database schema.
Return value
An array of a form item to be displayed on the client-side webform.
1 call to _webform_render_markup()
- _webform_submission_display_markup in components/
markup.inc - Display the markup in the results. The output of this function will be displayed under the "results" tab then "submissions".
File
- components/
markup.inc, line 38
Code
function _webform_render_markup($component) {
// We don't want users to be able to execute filters outside of their permissions on preview.
if ($_POST['op'] == t('Preview')) {
$check_filter = true;
}
else {
$check_filter = false;
}
$form_item = array(
'#type' => 'markup',
'#weight' => $component['weight'],
'#value' => _webform_filtervalues(check_markup($component['value'], $component['extra']['format'], $check_filter), FALSE),
'#prefix' => '<div class="webform-component-' . $component['type'] . '" id="webform-component-' . $component['form_key'] . '">',
'#suffix' => '</div>',
);
return $form_item;
}