Unique Code Field
Categories
Component ID
Component name
Component type
Maintenance status
Development status
Component security advisory coverage
Downloads
Component created
Component changed
Component body
Adds a new read-only Unique Code type to Drupal Fields. This field can be assigned to every entity.
How does it work?
This field will be pre-filled with a randomly generated code based on the settings provided by the User.
It will automatically perform a check to ensure that the code is unique in the field parent entity.
The user can choose between these types of code:
- Alphanumeric
- Numbers only
- Letters only
Dependencies
Install
-
Via Composer
composer require drupal/unique_code_field
Composer will download the module along with its required external libraries
-
Via Drupal
Simply copy/paste the link of this package inside the install from url field or download it in you modules directory.
Note: If you are not using Composer, you can manage external libraries with Ludwig
Usage
Just add a new field to your entitycontent and choose Unique Code from the Field Type dropdown. Setting the options should be a trivial task, you just have to choose the code length and type (please refer to code types listed above) and your field should be ready to work.