The calculated machine is not synced when the source value is defined and the machine name is empty.

Created on 4 April 2024, 9 months ago
Updated 7 June 2024, 7 months ago

Problem/Motivation

The calculated machine is not synced when the source value is defined and the machine name is empty.

Steps to reproduce

  • Create a form using the below elements.
  • Notice how the machine is set and correct
  • Change the title and machine name is not updated.
    $form['id'] = [
      '#type' => 'machine_name',
      '#default_value' => $webform->id(),
      '#machine_name' => ['source' => ['title']],
    ];
    $form['title'] = [
      '#type' => 'textfield',
      '#title' => $this->t('Title'),
      '#default_value' => 'A default title',
      '#id' => 'title',
    ];

Proposed resolution

Adjust the machine_name.js to properly sync the calculated machine name,

Remaining tasks

Determine a solution
Create MR
Commit MR

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Release notes snippet

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component
FormΒ  β†’

Last updated 2 days ago

Created by

πŸ‡ΊπŸ‡ΈUnited States jrockowitz Brooklyn, NY

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024