class Form

Same name in this branch
  1. main core/modules/system/tests/modules/router_test_directory/src/Form.php \Drupal\router_test\Form
Same name and namespace in other branches
  1. 11.x core/modules/system/tests/modules/router_test_directory/src/Form.php \Drupal\router_test\Form
  2. 11.x core/lib/Drupal/Core/Render/Element/Form.php \Drupal\Core\Render\Element\Form
  3. 10 core/lib/Drupal/Core/Render/Element/Form.php \Drupal\Core\Render\Element\Form
  4. 9 core/lib/Drupal/Core/Render/Element/Form.php \Drupal\Core\Render\Element\Form
  5. 8.9.x core/lib/Drupal/Core/Render/Element/Form.php \Drupal\Core\Render\Element\Form

Provides a render element for a form.

Attributes

#[RenderElement('form')]

Hierarchy

Expanded class hierarchy of Form

66 string references to 'Form'
AjaxFormCacheTest::testFormCacheUsage in core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormCacheTest.php
Tests the usage of form cache for AJAX forms.
BlockContent::baseFieldDefinitions in core/modules/block_content/src/Entity/BlockContent.php
Provides base field definitions for an entity type.
Ckeditor5Hooks::theme in core/modules/ckeditor5/src/Hook/Ckeditor5Hooks.php
Implements hook_theme().
ClaroVerticalTabsTest::testVerticalTabs in core/tests/Drupal/KernelTests/Core/Theme/ClaroVerticalTabsTest.php
Confirms that Claro can render vertical tabs correctly.
Comment::baseFieldDefinitions in core/modules/comment/src/Entity/Comment.php

... See full list

4 #type uses of Form
FormAjaxSubscriberTest::testOnException in core/tests/Drupal/Tests/Core/Form/EventSubscriber/FormAjaxSubscriberTest.php
Tests on exception.
FormAjaxSubscriberTest::testOnExceptionNestedException in core/tests/Drupal/Tests/Core/Form/EventSubscriber/FormAjaxSubscriberTest.php
Tests on exception nested exception.
FormAjaxSubscriberTest::testOnExceptionNewBuildId in core/tests/Drupal/Tests/Core/Form/EventSubscriber/FormAjaxSubscriberTest.php
Tests on exception new build id.
FormAjaxSubscriberTest::testOnExceptionResponseBuilderException in core/tests/Drupal/Tests/Core/Form/EventSubscriber/FormAjaxSubscriberTest.php
Tests on exception response builder exception.

File

core/lib/Drupal/Core/Render/Element/Form.php, line 10

Namespace

Drupal\Core\Render\Element
View source
class Form extends RenderElementBase {
  
  /**
   * {@inheritdoc}
   */
  public function getInfo() {
    return [
      '#method' => 'post',
      '#theme_wrappers' => [
        'form',
      ],
    ];
  }

}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.