- In your module's directory, create a config directory, and then create a directory inside it named install.
- Create a file named drupalform.schema.yml . This file will tell Drupal about the configuration item that we want to save.
- Add the following configuration schema definition to drupalform.schema.yml:
drupalform.company: type: config_object label: 'Drupal form settings' mapping: company_name: type: string label: 'A company name'
This tells Drupal that we have the configuration with the name drupalform.company, and it has a valid option of company_name. We will cover this in more detail in Chapter 9, Configuration Management - Deploying in Drupal 8.
- Next, edit the module's src/Form/ExampleForm.php file. Replace ...