Machine Name Field (machine)

Component ID

2642174

Component name

Machine Name Field (machine)

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

This is a pretty functional module that incorporates the best of the Machine name module and the Safeword module.

Features:

Field Types

  • Machine name (only)
  • Machine name with Text

Field Widgets

  • Machine name only (default)
  • Machine name from title
  • Machine name with text

Validation
Neither the machine_name module nor the safeword module provide very reliable validation for unique machine names. This module has reliable common validation including:

  • Unique per entity
  • Unique per field
  • Unique per entity type
  • Unique per bundle

Safeword integrates with transliteration which this module does not.

Roadmap
The following features are planned before becoming a "Full project", albeit this might end up being merged in with one of the aforementioned modules:

  • Editability
    Presently all machine fields are always editable. Options for preventing changes to machine names will be implemented either once they are created or by providing a custom callback. One problem that I have with a current implementation is that once a field is disabled, the value is no longer passed through the $form_state. So this module will supplement the disabled machine name field with an arbitrarily named field, while continuing to pass the machine name as a value.
  • Token support
    Token support is missing, but this will be added soon.
  • Migrate support
    Migrating machine names only works fine, but I haven't tested migrating machine names with text.

If you have interest in seeing this project move forward, let me know by sending me a message or dropping a line in the issue queue!