function _webform_submission_display_textfield in Webform 5.2
Same name and namespace in other branches
- 5 components/textfield.inc \_webform_submission_display_textfield()
- 6.2 components/textfield.inc \_webform_submission_display_textfield()
Display the result of a textfield submission. The output of this function will be displayed under the "results" tab then "submissions".
Parameters
$data: An array of information containing the submission result, directly correlating to the webform_submitted_data database schema.
$component: An array of information describing the component, directly correlating to the webform_component database schema.
$enabled: If enabled, the value may be changed. Otherwise it will set to readonly.
Return value
Textual output formatted for human reading.
File
- components/
textfield.inc, line 151 - Webform module textfield component.
Code
function _webform_submission_display_textfield($data, $component, $enabled = FALSE) {
$form_item = _webform_render_textfield($component);
$form_item['#default_value'] = $data['value']['0'];
if (!$enabled) {
$form_item['#attributes']['readonly'] = 'readonly';
}
return $form_item;
}