Send a Message to a Selected Location

Authored on
Wed, 01/24/2024 - 00:00
Tags
Body

A client who has multiple locations needed an Appointments contact form where people can select a location. The form submission then needed to go to that location.

We had luck getting it to happen with our Drupal sites. Not sure if this is the best way but it worked for us.

We have a Place content type with an email field with a unique email address for each Place. We set up a View with an entity reference with all the Places. In that entity reference, the two fields are Title and Email (which is hidden).

In the Appointments contact form, you need to set up a new contact email (/structure/contact/manage/appointments/emails). There is a selector for Recipient Type which should be set to "The value of a specific field in an entity reference". There will then be a selector for Recipient Reference which you set to "Place: Email (field_email)" or whatever you named your Email field.

Your forms should now send to the correct location.

Today's Albums

Title Artist Release Date Genre
Programme Commun Luc Ferrari, Brunhild Ferrari Classical
5th Lee Michaels Psyche
Ax Ox Gnoomes Psyche
Palo Congo Sabu Jazz