Avoid config form field type "machine_name"
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3522693. --> Reported by: [jurgenhaas](https://www.drupal.org/user/168924) Related to !507 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>This is a follow-up issue on <span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/eca/-/work_items/3518824" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/eca/-/work_items/3518824</a></span> and we should consistently avoid the usage of <code>machine_name</code> as a form field type.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <ul> <li>There are 11 other cases where the field type <code>machine_name</code> is being used, most of them allow tokens as well and could run into the same problem. We should replace them all for consistency.</li> <li>Most of those cases support tokens or require a token reference, both of which not being declared in the form field configuration. That should be added.</li> <li>Form field validation: those fields that get the token reference attribute will still be validated. But others won't. We may consider our own validation as a replacement for the machine name validation that we've then lost.</li> </ul> > Related issue: [Issue #3518824](https://www.drupal.org/node/3518824)
issue