You are here

function makemeeting_pollpanel_form in Make Meeting Scheduler 7

Same name and namespace in other branches
  1. 6 makemeeting.module \makemeeting_pollpanel_form()

The poll panel form

1 string reference to 'makemeeting_pollpanel_form'
node_makemeeting_view in ./makemeeting.module
Implementation of hook_node_view()

File

./makemeeting.module, line 675
Make Meeting module

Code

function makemeeting_pollpanel_form($form, &$form_state, $node) {
  $form['add_your_vote'] = array(
    '#type' => 'fieldset',
    '#title' => t('Add your vote'),
    '#tree' => TRUE,
  );
  $attributes = array(
    'days_and_options' => isset($node->days_and_options) ? $node->days_and_options : NULL,
    'answers' => isset($node->answers) ? $node->answers : NULL,
    'multiple_allowed' => isset($node->multiple_allowed) ? $node->multiple_allowed : NULL,
    'maybe_option' => isset($node->maybe_option) ? $node->maybe_option : NULL,
    'secure' => isset($node->secure) ? $node->secure : NULL,
  );
  $form['add_your_vote']['pollpanel'] = array(
    '#type' => 'makemeeting_choices',
    '#title' => t('Add your vote'),
    '#attributes' => $attributes,
    '#default_value' => $attributes,
    '#description' => t('Choose your name and select the answers.'),
  );
  $form['node_id'] = array(
    '#type' => 'value',
    '#value' => $node->nid,
  );
  $form['poll_url'] = array(
    '#type' => 'value',
    '#value' => $node->poll_url,
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Submit'),
  );
  return $form;
}