You are here

function theme_makemeeting_answer_row in Make Meeting Scheduler 7.2

Function used to render a single answer row as a form

File

./makemeeting.theme.inc, line 49

Code

function theme_makemeeting_answer_row($vars) {
  $form = $vars['form'];
  $element = array(
    '#prefix' => '<table><tr>',
    'first_cell' => array(),
    'other_cells' => array(
      '#markup' => '',
    ),
    '#suffix' => '</tr></table>',
  );

  // Render suggestions
  foreach (element_children($form['answers']) as $answer_key) {
    $element['other_cells']['#markup'] .= _theme_table_cell(array(
      'data' => drupal_render($form['answers'][$answer_key]),
      'class' => $form['answers'][$answer_key]['#type'],
    ));
  }

  // Render name, submit and the rest of hidden children
  $first_cell = drupal_render($form['name']) . drupal_render($form['submit']);
  $first_cell .= drupal_render_children($form);
  $element['first_cell']['#markup'] = _theme_table_cell($first_cell);
  return drupal_render($element);
}