Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Views Bootstrap 5.5.4 — Minor update available for module views_bootstrap (5.5.4). Release: Rightup theme 1.0.3 — Minor update available for theme vartheme_bs5_rightup (1.0.3). Release: CommentOn 1.0.6 — Minor update available for module commenton (1.0.6). Release: ChatGPT Ads 1.0.3 — Minor update available for module chatgpt_ads (1.0.3). Release: Opensolr Search 5.1.3 — Minor update available for module opensolr_search (5.1.3). Release: ServiceM8 Webform Integration 1.2.1 — Minor update available for module servicem8_webform (1.2.1). Release: PostfixAdmin 1.0.0 — Initial release available for module postfix_admin (1.0.0)! Release: ip_analyser 1.0.3 — Minor update available for module ip_analyser (1.0.3). Module Revived: Swagger-PHP OpenAPI 3 documentation generator 1.0.0 — Module swagger_php updated after 10 months of inactivity (1.0.0). Security Coverage: Microsoft Azure AI — Module ai_provider_azure now has official Drupal security advisory coverage.

The E-mail Formatter module is a field formatter for the Email field (in Drupal
8 core) to allow email field addresses to be:

  • rendered with mailto: links
  • truncated to a specified number of characters for rendering, and if
    truncated then ended with an ellipsis (…)
  • preceded by
    • custom text
    • custom HTML
    • an appropriate Font Awesome icon, which can also be rendered as a mailto: link to the address

Requirements

The Drupal 8+ core field module using the e-mail format is required, obviously,
and if the icons option is used, then the Font Awesome Icons module (8.x-2.x) that adds the FA project to Drupal allowing the icons to be displayed will be needed too.

If you're using it, don't forget to add/upgrade to the latest version of Font Awesome via your /admin/config/content/fontawesome settings.

Installation

Install as you would normally install a contributed drupal module.

Configuration

Just head to a content type display management tab (ex. http://yoursite.com/admin/structure/types/manage/yourtype/display) where you have an email field/fields. In the format column for the email field that you want to use this formatter, select the 'E-mail formatter (with options)' format, and save the form to put it into use.

Click the settings cog/gear button to view and edit the (hopefully) self-explanatory options for how the links should be displayed.

To customise the output further, just theme your pages as usual.

Troubleshooting

Try clearing all your caches using the performance configuration page should you encounter any issues.

Edit the settings for the problematic field, using the cog/gear button, to flush out any invalid settings from previous versions of this module.

Don't forget to add/upgrade to the latest version of Font Awesome via your /admin/config/content/fontawesome settings.

Future plans

Support Twig templating of the output.

Thanks

The icons are from the Font Awesome project, by Greg Loucas and Dave Gandy.

The font has been made available to Drupal in the Font Awesome Icons module by Rob
Loach (RobLoach)
and Inder Singh (inders)

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Apr 2024
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Dormant

Releases

Version Type Core Release date
2.0.0-rc3 Pre-release Apr 1, 2024