Add support for Field Token Value module

Created on 6 July 2024, 6 months ago
Updated 8 September 2024, 3 months ago

Can you please add support for the Field Token Value module? I'd like barcodes to be able to generate QR Codes for the value of the field token value module.

https://www.drupal.org/project/field_token_value β†’

✨ Feature request
Status

Fixed

Version

2.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jrealsteed

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @jrealsteed
  • Status changed to Fixed 4 months ago
  • πŸ‡ΊπŸ‡Έ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.

Production build 0.71.5 2024