- Issue created by @jrealsteed
- Status changed to Fixed
3 months ago 12:38am 24 August 2024 - πΊπΈUnited States tr Cascadia
This request comes up frequently - everyone want explicit support for their own favorite field type added to the Barcodes module. But this is not a scalable or maintainable thing to do, so this will not be added to the module.
I'm open to a general solution that allows site builders to customize the supported fields without hacking or patching code. I left β¨ Support Serial Field Needs work open for discussing that.
The standard way to customize Drupal for your site is to implement a hook. This would work for your needs, for example:
/** * Implements hook_field_formatter_info_alter(). */ function yourmodule_field_formatter_info_alter(array &$info) { // Allow the barcode field formatter to be used on a new field type. $info['barcode']['field_types'][] = 'field_token_value'; }
And I feel that for reference I need to add that "yourmodule" should be replaced with the name of your module that you are using to customize your site. Read the documentation on how to implement a hook for details.
Automatically closed - issue fixed for 2 weeks with no activity.