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.

Same form, multiple pages, different recipients

  1. I have one form on several pages on a client's site. The client would like the form data to be emailed to different addresses based on which page the form was filled out on. I'm not sure how to set that up....please help?

    Thanks.

    Posted 7 years ago on Sunday August 12, 2012 | Permalink
  2. Douglas Cox
    Member

    Hi there,

    There are a couple ways I can think of to set this up... the first would of course be to simply duplicate the existing form, and place a different version on each page, with different notification options. This way is simple but has the major limitation of having multiple forms to edit when you need to change something. The second way would be to use the "Routing" options in the form notification settings, and basing the routing logic on the value of a hidden field in the form, which would contain the embed URL of the form. Here's what I would do...

    1. Edit your form and create a new text field. On the "Advanced" tab, set the "Visibility" to "Admin Only", and in "Default Value" select "Embed URL" from the "Insert Merge Tag" drop down.
    2. Update your form.
    3. Go to the "Notifications" page for your form.
    4. In the admin notification settings, change "Send To Email" option to "Routing".
    5. Create a new rule line for each page on which your form is embedded. Set the e-mail address that should receive the submission, the "if" option to the hidden field you created earlier, change the "is" condition to "starts with", and then paste the full URL of the page in the last box.

    To be clear, a rule should read like this: Send to [reception@domain.com] if [Embed URL] [starts with] [http://domain.com/contact/]

    I suggest using the "starts with" option so that the rule is not broken by hooks or other URL parameters (like ref tags, analytics, etc).

    I hope that works for what you want to do!

    Posted 7 years ago on Sunday August 12, 2012 | Permalink
  3. This is great! My only other question is...

    So not all pages require that the email is sent to something other than the admin email. I set it up so the the first rule is that all pages starting with the base url get sent to admin, and the other rules are that if a page IS {embed_URL} the info is sent to a specific email address. Would this be the correct way to do it? Will ALL of the form data be sent to the admin email, in addition to the specific recipients for the appropriate pages as well? I'd prefer that the page specific data not be sent to the admin email as well.

    Thanks so much!

    Posted 7 years ago on Monday August 13, 2012 | Permalink
  4. Douglas Cox
    Member

    I'm not clear on what you're asking... How you setup your rules largely depends on how you have your site structured, and exactly how you're implementing this form, so it can vary.

    What I will mention about the "IS" condition is that http://domain.com/contact/ and http://domain.com/contact/?source=email are not the same thing, and if a referrer adds any such parameters (like an e-mail campaign, other website, etc.) it could break the functionality of your form. I find "starts with" to be more flexible, and allows for more possibilities.

    If you set a rule that says "Send to {admin} if URL starts with the root domain of your site, then yes, the admin will receive everything, even if it's sent to another rule.

    If you provide a bit more detail on how this is being applied to the site, I might be able to give you a better answer. Hope this is helpful!

    Posted 7 years ago on Monday August 13, 2012 | Permalink