function theme_webform_results_download_select_format in Webform 7.4
Same name and namespace in other branches
- 6.3 includes/webform.report.inc \theme_webform_results_download_select_format()
- 7.3 includes/webform.report.inc \theme_webform_results_download_select_format()
Theme the output of the select list format radio buttons.
1 theme call to theme_webform_results_download_select_format()
- webform_results_download_form in includes/
webform.report.inc - Form to configure the download of CSV files.
File
- includes/
webform.report.inc, line 817 - This file includes helper functions for creating reports for webform.module.
Code
function theme_webform_results_download_select_format($variables) {
drupal_add_library('webform', 'admin');
$element = $variables['element'];
$output = '';
// Build an example table for the separate option.
$header = array(
t('Option A'),
t('Option B'),
t('Option C'),
);
$rows = array(
array(
'X',
'',
'',
),
array(
'X',
'',
'X',
),
array(
'',
'X',
'X',
),
);
$element['separate']['#attributes']['class'] = array();
$element['separate']['#description'] = theme('table', array(
'header' => $header,
'rows' => $rows,
'sticky' => FALSE,
));
$element['separate']['#description'] .= t('Separate options are more suitable for building reports, graphs, and statistics in a spreadsheet application.');
$output .= drupal_render($element['separate']);
// Build an example table for the compact option.
$header = array(
t('My select list'),
);
$rows = array(
array(
'Option A',
),
array(
'Option A,Option C',
),
array(
'Option B,Option C',
),
);
$element['compact']['#attributes']['class'] = array();
$element['compact']['#description'] = theme('table', array(
'header' => $header,
'rows' => $rows,
'sticky' => FALSE,
));
$element['compact']['#description'] .= t('Compact options are more suitable for importing data into other systems.');
$output .= drupal_render($element['compact']);
return $output;
}