form_state_defaults

  1. drupal
    1. 8
    2. 7
Versions
8 – 7 form_state_defaults()

Retrieve default values for the $form_state array.

Related topics

▾ 7 functions call form_state_defaults()

ajax_get_form in includes/ajax.inc
Get a form submitted via #ajax during an Ajax callback.
drupal_build_form in includes/form.inc
Build and process a form based on a form id.
drupal_form_submit in includes/form.inc
Retrieves, populates, and processes a form.
FieldAttachOtherTestCase::testFieldAttachForm in modules/field/tests/field.test
Test field_attach_form().
FieldAttachOtherTestCase::testFieldAttachSubmit in modules/field/tests/field.test
Test field_attach_submit().
FormsElementsTableSelectFunctionalTest::formSubmitHelper in modules/simpletest/tests/form.test
Helper function for the option check test to submit a form while collecting errors.
FormsTestCase::testRequiredFields in modules/simpletest/tests/form.test
Check several empty values for required forms elements.

Code

includes/form.inc, line 380

<?php
function form_state_defaults() {
  return array(
    'rebuild' => FALSE, 
    'rebuild_info' => array(), 
    'redirect' => NULL,
    // @todo 'args' is usually set, so no other default 'build_info' keys are
    //   appended via += form_state_defaults(). 
    'build_info' => array(
      'args' => array(), 
      'files' => array(),
    ), 
    'temporary' => array(), 
    'submitted' => FALSE, 
    'executed' => FALSE, 
    'programmed' => FALSE, 
    'cache' => FALSE, 
    'method' => 'post', 
    'groups' => array(), 
    'buttons' => array(),
  );
}
?>