sender_url should not contain mailto:

Created on 29 June 2024, 2 months ago
Updated 15 August 2024, 24 days ago

Hello, I'm using this module on a Drupal 10 site. And on the 'Mailer policy' page at Contact form ยป Message ยป *All*, I've modified the content slightly to more closely match the Default contact form's notification message:

<p>{{ sender_name }} ({{ sender_url }}) sent a message using the contact form at {{ form_url }}.</p>
<hr>
{{ body }}

This gets me pretty close, but there are 2 improvements I'd really like to make and can't figure out how.

#1. In the default contact form, the message shows the sender's e-mail address more clearly (and simply). For example, it looks like this:
Rob Roberts (not verified) (name@outlook.com) sent a message ...

However, with the above variables in place, the Symfony message looks like this:
Rob Roberts (not verified) (mailto:name@outlook.com) sent a message ...

I just want this to be clean and simple, and *not* show the "mailto" part since that is obvious and unnecessarily cluttered looking.

#2. At the end of the message, the default Drupal message text looks like this:
... using the contact form at https://www.domain.com/contact.

However, the Symfony version looks like this:
... using the contact form at /contact.

In this case, it would be preferable to show the entire URL since it's more informative and looks better as well

I have scoured Google, the "contact.module" file, and aside from the linked related issues I'm not finding anything of use. I appreciate that the work on these issues is complex, so in the meantime it'd be great if someone could enlighten me on how to do these 2 things:

  1. Change {{ sender_url }} to the desired variable
  2. Change {{ form_url }} to the desired variable

Since this is how the default Drupal text looks, I know it must be possible! Any help to make these small-yet-important (to me) changes would be much appreciated.

๐Ÿ› Bug report
Status

Needs work

Version

1.4

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States jimmb

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024