solspace / craft-express-forms

Express Forms for Craft: Intuitive and lightweight form builder that gets the job done but doesn’t get in your way.
https://docs.solspace.com/craft/express-forms/v2/
Other
13 stars 4 forks source link

"dynamic notifications" allows only 1 notification #99

Closed krizzzly closed 2 years ago

krizzzly commented 2 years ago

Express Forms has Admin-Notifications and Submitter-Notifications. But "Dynamic-Notifications" in form options seems to allow only 1 notification. Is there something i am missing here. Thx for clarification.

Kind regards

Chris

PS: For automated form testing i would like to be able to overwrite the Admin-Notifications and Submitter-Notifications from GUI, and add dynamic Notifications to "testing-mailboxes".

kjmartens commented 2 years ago

I haven't tested this myself, but I believe you could have multiple dynamic recipients by specifying multiple iterations here:

{{ form.openTag({
  dynamicRecipients: {
    myFieldHandle: {
      map: {
        sales: "sales@example.com",
        service: "service@example.com",
        support: ["support@example.com", "another@example.com"]
      },
      template: "template-filename.twig",
    },
    myFieldOtherHandle: {
      map: {
        a: "a@example.com",
        b: "b@example.com",
        c: ["c@example.com", "another@example.com"]
      },
      template: "template-filename.twig",
    },
  }
}) }}
krizzzly commented 2 years ago

I thought actually about "dynamic notifications" not "dynamic recipients". https://craft.express/forms/v1/overview/email-notifications.html#dynamic-template

The goal is: the "Admin notification" setting from GUI is overwritten bei config, "Submitter notification" is send out as set in GUI( or it is also overwritten by config.)