function _webform_table_grid in Webform 6.3
Same name and namespace in other branches
- 7.4 components/grid.inc \_webform_table_grid()
- 7.3 components/grid.inc \_webform_table_grid()
Implements _webform_table_component().
File
- components/
grid.inc, line 343 - Webform module grid component.
Code
function _webform_table_grid($component, $value) {
$questions = _webform_select_options_from_text($component['extra']['questions'], TRUE);
$options = _webform_select_options_from_text($component['extra']['options'], TRUE);
$output = '';
// Set the value as a single string.
foreach ($questions as $key => $label) {
if (isset($value[$key]) && isset($options[$value[$key]])) {
$output .= _webform_filter_xss($label) . ': ' . _webform_filter_xss($options[$value[$key]]) . '<br />';
}
}
return $output;
}