Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Automatic Configuration Form

9 sites No security coverage Drupal 11 · not 10
View on drupal.org

This module automatically generates configuration forms for your Drupal modules based on their schema definitions. It simplifies the process of creating forms, especially for simple modules or limited user bases, by eliminating the need for manual form coding.

The Schema form module can do everything that this module does, and more. I will continue to fix bugs in this module, but development of new features should happen in Schema form.

Generate your custom module's configuration form automatically from its schema definitions.

Writing config forms is boring. Mostly they all look the same, or are not very important, especially if it's for simple or small modules or for a limited amount of users. So let's automate it!

Example

If your module has config, it will have a schema file, e.g. at my_module/config/schema/my_module.schema.yml. Here is an example:

my_module.settings:
  type: config_object
  label: 'My module settings'
  translatable: false
  mapping:
    foo:
      type: string
      title: 'Foo'
      label: 'How much foo?'
    bar:
      type: boolean
      title: 'Enable bar'
      label: 'Whether to run bar or not.'

To create an automatic config form using this schema, create my_module/Form/ConfigForm.php with the following:


namespace Drupal\my_module\Form;

use Drupal\auto_config_form\AutoConfigFormBase;

/**
 * Settings form for my module.
 *
 * @package Drupal\my_module\Form
 */
class ConfigForm extends AutoConfigFormBase {

  /**
   * {@inheritDoc}
   */
  protected function getSchemaKey(): string {
    return 'my_module.settings';
  }

}

That's it!

Next steps

Drupal core compatibility

  • Drupal 10: Use version 1.x
  • Drupal 11: Use version 2.x

Drupal 10 needs protected $typedConfigManager; and Drupal 11 needs protected TypedConfigManagerInterface $typedConfigManager;, and they are mutually exclusive. This forces us to maintain separate versions of this module for Drupal 10 and Drupal 11. See https://www.drupal.org/project/auto_config_form/issues/3532554 and https://www.drupal.org/project/auto_config_form/issues/3412011 for where we accidentally messed this up twice.

Similar modules

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
4
Tracked since
Apr 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 4
Maintenance
Dormant

Release Timeline

Releases

Version Type Core Release date
2.0.0 Stable 11 Aug 14, 2025
1.2.0 Stable 10 Aug 14, 2025
1.1.2 Stable 9–10 Aug 14, 2025
1.1.1 Stable 9–11 Apr 9, 2025