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.

Modify User Notification Email Based on Dropdown Selection of Countries

  1. My client has a list of about 40+ international dealers that they are trying to route email leads from the website. Much like an earlier thread's situation (http://www.gravityhelp.com/forums/topic/modufy-user-notification-email-based-on-dropdown-selection), I am trying to send the dealer the lead information and send the submitter the dealer contact information with the response.

    My question is, can I use the code you mention in this post (http://pastebin.com/UK97mqZe), but modify it with the appropriate countries and contacts?

    In the referenced thread, Jed is only working with about 3 locations to route to. Is the code you've written expandable to work with the 40+ locations I am dealing with? And, what do I do with the countries that have no dealers in them? I suppose I can craft a response for those countries as a default or does the code only generate a link for the countries mentioned in the dropdown selection? What other global changes would I need to make?

    And finally, if I make these modifications, will I still need to input the routing information into the Notification to Administrator section or would that be redundant after these changes?

    Posted 11 years ago on Thursday August 9, 2012 | Permalink
  2. If you already have your routing rules setup based on the drop downs and each has one email per line, you could use conditional shortcodes to spit out the appropriate information based on selection in your user notification:

    http://www.gravityhelp.com/documentation/page/Shortcodes

    Posted 11 years ago on Thursday August 9, 2012 | Permalink
  3. That's a great idea with the shortcodes.

    Just to be clear, you're saying to use the code I mentioned above to set up the routing criteria and then use the shortcodes for the response information?

    Otherwise, I am trying to route the submitters by country and the Notifications routing won't let me do that – only by email phone, email or additional comments fields.

    Posted 11 years ago on Thursday August 9, 2012 | Permalink
  4. You should be able to route by country if you make the country it's own drop down field. I assume you are using the "Address Field". If so, disable the country drop down on the address field and then add a new "drop down" field and use the bulk/add option to select countries. Save your form and now that should be accessible in the routing and your conditional notification code.

    Posted 11 years ago on Friday August 10, 2012 | Permalink