batch_example_multistep_form_submit

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

developer/examples/batch_example.module, строка 116

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

Код

<?php
function batch_example_multistep_form_submit($form, &$form_state) {
  $step = isset($form_state['storage']['step']) ? $form_state['storage']['step'] : 1;

  switch ($step) {
    case 1:
      drupal_set_message('step 1 submitted');
      batch_set(batch_example_batch_1());
      break;
    case 2:
      drupal_set_message('step 2 submitted');
      batch_set(batch_example_batch_2());
      // this does not seem to work ?
      $form_state['redirect'] = 'batch_example/example_3';
      break;
  }

  $form_state['storage']['step'] = $step + 1;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

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