I have a Formie form on my site where users can request a white paper. After filling in the form, their browser opens the PDF in a separate tab. I also want to send the user a confirmation email with a clickable link in it that points to the white paper PDF. The Formie email content editor has no 'insert hyperlink' tool. How do you embed a hyperlink in a Formie notification email?
2 Answers
You can write the text in another Rich Text Editor (for example CK or Redactor) and then Copy & Paste the formatted text including the link. Or you write the html file, open it in the browser and copy the Rich Text there and paste it in the Formie editor.
Formie will not strip it out (at the time of this writing).
-
I gave this a try by copying text created in Redactor, which contained a link to an asset. That hyperlink is indeed not stripped out. Unfortunately, not all mail clients seem to treat the link the same way. In Gmail I could access the linked asset but in the Roundcube mail client the link was simply gone. I need to do some more testing, because this is only a valid approach if the links work in all mail clients. Commented Nov 16, 2023 at 8:18
-
That's good to know. What did you learn in your tests? Is this a valid way to go? Commented Nov 20, 2023 at 10:34
The best way is probably to create custom email templates so you can add the link directly in the twig template: https://verbb.io/craft-plugins/formie/docs/template-guides/email-templates
I believe they provide a "Copy Templates" feature, so it should be as simple as cloning the default templates and tweaking the code a bit.