poll_more_choices_submit

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

modules/poll/poll.module, строка 284

Версии
6
poll_more_choices_submit($form, &$form_state)

Submit handler to add more choices to a poll form. This handler is used when javascript is not available. It makes changes to the form state and the entire form is rebuilt during the page reload.

Код

<?php
function poll_more_choices_submit($form, &$form_state) {
  // Set the form to rebuild and run submit handlers.
  node_form_submit_build_node($form, $form_state);

  // Make the changes we want to the form state.
  if ($form_state['values']['poll_more']) {
    $n = $_GET['q'] == 'poll/js' ? 1 : 5;
    $form_state['choice_count'] = count($form_state['values']['choice']) + $n;
  }
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему