function theme_poll_choices


Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/
cis7 poll.module theme_poll_choices($variables)
cle7 poll.module theme_poll_choices($variables)
elmsmedia7 poll.module theme_poll_choices($variables)
icor7 poll.module theme_poll_choices($variables)
meedjum_blog7 poll.module theme_poll_choices($variables)
mooc7 poll.module theme_poll_choices($variables)

Returns HTML for an admin poll form for choices.


$variables: An associative array containing:

  • form: A render element representing the form.

Related topics

4 string references to the theme hook from theme_poll_choices()

Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.

drupal-6.filled.database.php in modules/simpletest/tests/upgrade/drupal-6.filled.database.php
Filled installation of Drupal 6.17, for test purposes.
poll_form in modules/poll/poll.module
Implements hook_form().
poll_theme in modules/poll/poll.module
Implements hook_theme().
poll_update_7001 in modules/poll/poll.install
Use the poll_choice primary key to record votes in poll_votes rather than the choice order. Rename chorder to weight.


modules/poll/poll.module, line 851
Enables your site to capture votes on different topics in the form of multiple choice questions.


function theme_poll_choices($variables) {
  $form = $variables['form'];

  drupal_add_tabledrag('poll-choice-table', 'order', 'sibling', 'poll-weight');

  $is_admin = user_access('administer nodes');
  $delta = 0;
  $rows = array();
  $headers = array('', t('Choice'));
  if ($is_admin) {
    $headers[] = t('Vote count');
  $headers[] = t('Weight');

  foreach (element_children($form) as $key) {
    // Set special classes for drag and drop updating.
    $form[$key]['weight']['#attributes']['class'] = array('poll-weight');

    // Build the table row.
    $row = array(
      'data' => array(
        array('class' => array('choice-flag')),
      'class' => array('draggable'),
    if ($is_admin) {
      $row['data'][] = drupal_render($form[$key]['chvotes']);
    $row['data'][] = drupal_render($form[$key]['weight']);

    // Add any additional classes set on the row.
    if (!empty($form[$key]['#attributes']['class'])) {
      $row['class'] = array_merge($row['class'], $form[$key]['#attributes']['class']);

    $rows[] = $row;

  $output = theme('table', array('header' => $headers, 'rows' => $rows, 'attributes' => array('id' => 'poll-choice-table')));
  $output .= drupal_render_children($form);
  return $output;



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.