function _webform_table_optionsmarkup in Webform Options Markup 7
Same name and namespace in other branches
- 7.2 components/webform_optionsmarkup.inc \_webform_table_optionsmarkup()
Implements _webform_table_component().
File
- components/
webform_optionsmarkup.inc, line 461 - Webform component that allows markup in checkbox and radio options.
Code
function _webform_table_optionsmarkup($component, $value) {
// Convert submitted 'safe' values to un-edited, original form.
$options = _webform_optionsmarkup_options($component, TRUE);
$value = (array) $value;
$items = array();
// Set the value as a single string.
foreach ($value as $option_value) {
if ($option_value !== '') {
if (isset($options[$option_value]['title'])) {
$items[] = _webform_filter_xss($options[$option_value]['title']);
}
else {
$items[] = check_plain($option_value);
}
}
}
return implode('<br />', $items);
}