You are here

function advpoll_form_alter in Advanced Poll 7

Same name and namespace in other branches
  1. 5 advpoll.module \advpoll_form_alter()
  2. 6.3 advpoll.module \advpoll_form_alter()
  3. 6 advpoll.module \advpoll_form_alter()
  4. 6.2 advpoll.module \advpoll_form_alter()
  5. 7.3 advpoll.module \advpoll_form_alter()
  6. 7.2 advpoll.module \advpoll_form_alter()

File

./advpoll.module, line 319

Code

function advpoll_form_alter(&$form, $form_state, $form_id) {

  // Add validation to max_choices field.
  if ($form_id == 'advpoll_node_form') {
    $lang = $form['language']['#value'];
    $form['advpoll_max_choices'][$lang][0]['value']['#element_validate'][] = 'advpoll_validate_max_choices';
  }
}