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.

Get Routing Email Address via Post Custom Field

  1. Hi there guys;

    I'd like to get the admin email address of whom to send to via a custom field from within a post.

    Idea is, when a customer adds a branch to their site, they add the name, branch location and branch email address - this is all spat out on the page and looks cool.

    However they want email notifications to go to the branch directly, they add quite a few branches from time to time and using the standard way of routing via GravityForms is too technical for them and not fool proof.

    So basically just need to get the routing address via the post custom field, is this possible?

    Posted 13 years ago on Thursday August 11, 2011 | Permalink
  2. Yes this is possible if the form is embedded in the post containing the custom field data.

    - Add an Email field to your form

    - Edit this Email field and give it a Field Label of "Send To Email" or whatever you want to call it

    - Select the Advanced tab and make the field visibility so it is Admin Only

    - On the Advanced tab set the default value for that field to use the {custom_field} merge tag and pass it the name/key of the custom field you want to get the value from. If the custom field name is email then you would use {custom_field:email}

    - See this screenshot as an example: http://i.imgur.com/3Gr6T.png

    - Save your form

    - Edit your notificiations

    - On the Send To address for the Admin Notification you will use the merge tag for the email field you created. You can get it using the "Insert form field" drop down above the Message body to insert it into the Message and then just copy-n-paste it into the Send To field.

    - See this screenshot as an example, your merge tag will be different as it's dynamic: http://i.imgur.com/V10sf.png

    - Save notifications

    - Embed it on the post

    Now that email field is going to be hidden and it's going to be populated with the value of the custom field you tell it to use. Notifications are then going to send to that address.

    Posted 13 years ago on Thursday August 11, 2011 | Permalink
  3. Awesome thank you Carl! <3

    Posted 13 years ago on Friday August 12, 2011 | Permalink

This topic has been resolved and has been closed to new replies.