function theme_webform_display_matrix in Webform Matrix Component 7.4
Same name and namespace in other branches
- 6 components/matrix.inc \theme_webform_display_matrix()
- 7 components/matrix.inc \theme_webform_display_matrix()
- 7.2 components/matrix.inc \theme_webform_display_matrix()
- 7.3 components/matrix.inc \theme_webform_display_matrix()
Format the text output for this component.
1 theme call to theme_webform_display_matrix()
- _webform_display_matrix in components/
matrix.inc - Implements _webform_display_component().
File
- components/
matrix.inc, line 611 - Webform module matrix component.
Code
function theme_webform_display_matrix($variables) {
$matrix_value = $variables['element']['#value'];
//$output = theme('table', array('header' => $matrix_value['headers'], 'rows' => $matrix_value['rows']));
if ($variables['element']['#format'] == 'html') {
$output = theme('table', array(
'header' => $matrix_value['headers'],
'rows' => $matrix_value['rows'],
));
}
else {
$output = implode(' ~ ', $matrix_value['headers']) . "\n";
foreach ($matrix_value['rows'] as $row) {
$output .= implode(' ~ ', $row) . "\n";
}
}
// $output = theme('table', array('header' => $matrix_value['headers'], 'rows' => $matrix_value['rows']));
return $output;
}