Imagine a contact form on a corporate website that triggers an admin notification to different departments (e.g. HR, marketing, sales) depending on the user's entries? Or a lead form with different product categories that automatically notifies the responsible sales employee?
This is actually possible with Greyd.Forms. Here's how:
As an example we are going to build a form that is supposed to send the admin notification to different email addresses, depending on whether the user selects "A" or "B".
- Create your form as usual
- Place two conditional fields in your form and set the selection field as the condition.
- In the first condition set "has the value A" as condition, in the second "has the value B".
- Place a hidden field in the first conditional container and enter the first email address as its value
- Copy the hidden field, place it in the second conditional container and set the second email address as its value. It is very important that the hidden fields have exactly the same name (which is automatically the case when you copy the field).
- Publish your form and refresh your browser window
- Now you can set the admin email. You will find your hidden field as a dynamic element that can now be placed in the recipient field: