- Issue created by @ergonlogic
- 🇨🇦Canada ergonlogic Montréal, Québec 🇨🇦
It looks like
hook_field_formatter_info_alter()
might do the trick.
I'd like to use a computed token field to build a shortcode, and then display it as a copy-to-clipboard button.
The first part works fine. I can use the entity ID token to populate the field. But the formatters provided by ClipboardJS module aren't available for the display of the field.
I suspect that the underlying problem is that those field formatters specify which types of fields they are valid for (eg. string, email, etc.) I guess computed token fields are not presenting as one of those field types.
I suspect there's some kind of info_alter()
hook that might give us a chance to inject our field types.
Active
1.0
Code
It looks like hook_field_formatter_info_alter()
might do the trick.