Key is not automatically populated after validation failure on blank title

Created on 2 May 2019, over 5 years ago
Updated 4 March 2023, almost 2 years ago

Problem/Motivation

When editing the title field, the key (or machine name) field is not updated. This happens when the form was first submitted without a value in the title field.
The key field should be automatically populated from the title value, as it is before the validation failure.

Example forms where the issue occurs

  • Role add: /admin/people/roles/add
  • Field add:/admin/structure/types/manage/{node_type}/fields/add-field
  • Webform field add

Steps to reproduce

  1. When adding a field, leave the title field blank
  2. Click "Save"
  3. As expected, validation fails
  4. Enter a value in the title field
  5. Click "Save"
  6. A value for the machine name needs to be entered.

Proposed resolution

TBA

Remaining tasks

check for duplicates
patch
review
commit

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Active

Version

10.1 ✨

Component
FormΒ  β†’

Last updated about 8 hours ago

Created by

πŸ‡¬πŸ‡§United Kingdom malcomio

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024