drupal----confused by the argument $form_state

this is an example form the pro drupal book.

  function annotate_admin_settings() {

    $options = node_get_types('names');
      $form['annotate_node_types'] = array(

   '#type' => 'checkboxes',

    '#title' => t('Users may annotate these content types'),
    '#options' => $options,
    '#default_value' => variable_get('annotate_node_types', array('page')),
     '#description' => t('A text field will be available on these content types to
     make user-specific notes.'),
    );
    return system_settings_form($form);
   }

but form the drupal documentation, the builder of a form's style is like this.

function mymodule_myform($form_state) {

}

there is a parameter($form_state) in the funcion, when i should use this parameter.thank you.

5
задан Pekka supports GoFundMonica 5 December 2010 в 02:03
поделиться