example_form

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

./example.profile, строка 273

Версии
5 – 6
example_form(&$form_state, $url)

Form API array definition for the example form.

Код

<?php
function example_form(&$form_state, $url) {

    // This is just a very simple form with one textfield, and a
    // submit button.
    $form['example_text'] = array(
      '#type' => 'textfield',
      '#title' => st('Testing text'),
      '#default_value' => '',
      '#size' => 45,
      '#maxlength' => 45,
      '#required' => TRUE,
      '#description' => st('This is an example form demonstrating forms usage in the installer profiles tasks. Enter any text to see what happens.'),
    );

    $form['continue'] = array(
      '#type' => 'submit',
      '#value' => st('Continue'),
    );

    // Note that #action is set to the url passed through from
    // installer, ensuring that it points to the same page, and
    // #redirect is FALSE to avoid broken installer workflow.
    $form['errors'] = array();
    $form['#action'] = $url;
    $form['#redirect'] = FALSE;

  return $form;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

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