#form-builder localized e-mails

4 messages · Page 1 of 1 (latest)

boreal chasm
#

Hello!

We have a multi-tenant payloadcms including form-builder plugin and localization. We have an issue where if a user (for example) fills in a form on a German localized page, that the** e-mail **sent by form-builder contains text from the language defined in the defaultLocale in our payloadcms configuration, and not the localized version.

(form-builder sends an e-mail in English instead of German)..

Is localization of e-mails in form-build plugin not yet supported?

silver lightBOT
deft whale
boreal chasm
#

Hallo Sandro,

Yes, I did manage to solve this issue even though the solution might not be most optimal. In short, what I did in two steps:

  1. Added a "locale" field to form submissions (by adding a beforeChange hook in the plugin config).

  2. Use localized e-mail subject and message in form submission confirmations (I had to copy a part from plugin's code (re)place it into the beforeEmail configuration parameter in the Form Builder plugin, because the plugin does not support multiple languages yet).

Below are some basic examples how I did it
Hope it helps!