PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

One contact form for multiple emails

  1. Jackson Murphy

    I'm trying to figure out the best solution for this situation.
    I have a page that lists out a bunch of email/contacts.
    I would like to have one form that would email each person depending on which the user selects...

    Here's the Staff directory page...

    If you click on Ginny, then a form would pop up and you could email Ginny.
    I want to be able to use the same form but somehow pass a variable that would define the email to send the data to...

    Any ideas/solutions?

    Posted 11 years ago on Monday July 18, 2011 | Permalink
  2. This is called routing and is built in to Gravity Forms.

    Create your form with a drop down select box or radio buttons with all the names of people you might want to route the form submission to. Once that's done, Update the form (save) and then click the Notifications link above your form. (that link may or may not work.)

    There , you will see "Send to email" and then radio buttons for "Email" and "Routing". Click routing, and you will be able to set up an email address to use based on a condition met in the form. For example, if you had a drop down of Departments, you could route email to mary if the selection was Customer Service, or john if the selection was Sales.

    In your case, you have real names. Just match up the real name with their real email (which will never be shown in the form) and you'll be good to go.


    Routing is what you want. I see you started on it with a query string setup, but you're making it hard on yourself there.

    Posted 11 years ago on Tuesday July 19, 2011 | Permalink
  3. Jackson Murphy

    Thanks Chris for your response.

    I actually had it the way you mention... using a drop down box and routing. The client accidentally deleted it :)

    So I was looking for another way to do it...
    I ended up with 2 hidden fields...
    One that is dynamically populated using a query string...

    The other hidden field contains the variable for the email address:
    I couldn't figure out how to pass an email address in a query string. It kept stripping the @ sign.

    In Notifications, I list out the two variables in the Send to Email
    {Staff Name:10}{} =

    Seems to be working!
    What do you think?

    Posted 11 years ago on Tuesday July 19, 2011 | Permalink
  4. That can work too, it is one of many different ways you could accomplish what you are trying to do. Another way I would suggest is using a drop down and letting the user select the person they want to contact from the drop down. You could also pre-populate this drop down via the link to the form.

    To do this you would do the following:

    - Edit your form
    - Add a Drop Down field to your form
    - Give it a Field Label of "Who would you like to contact?" or whatever you want to call it
    - Select the "Enable Values" checkbox
    - Configure the options so the Label has the persons name and the value has the persons email address. See this screenshot:
    - Save your form

    Now to use this in the Send To you would:

    - Edit the Notifications for that form
    - Get the Merge Tag for the Drop Down you created by inserting it into the Message Body and then copy-n-pasting it into the Send To field
    - Modify the merge tag to request only the value, you do this by adding an additional option to the merge tag. You would change this: {My Field Name:5} to this: {My Field Name:5:value}
    - Save your notifications

    If you did the above steps properly, the Send To would now be set by the value of the drop down you created which allows the user to select which staff member they wish to contact and that persons email address is populated via the value of that drop down field.

    Posted 11 years ago on Tuesday July 19, 2011 | Permalink