function _webform_table_data_select in Webform 5.2
Same name and namespace in other branches
- 5 components/select.inc \_webform_table_data_select()
- 6.2 components/select.inc \_webform_table_data_select()
Return the result of this component's submission for display in a table. The output of this function will be displayed under the "results" tab then "table".
Parameters
$data: An array of information containing the submission result, directly correlating to the webform_submitted_data database schema
Return value
Textual output formatted for human reading.
File
- components/
select.inc, line 372 - Webform module multiple select component.
Code
function _webform_table_data_select($data) {
$output = '';
// Set the value as a single string.
if (is_array($data['value'])) {
foreach ($data['value'] as $value) {
if ($value !== '0') {
$output .= check_plain($value) . '<br />';
}
}
}
else {
$output .= check_plain(empty($data['value']['0']) ? '' : $data['value']['0']);
}
return $output;
}