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.

Send to email address based on custom field checkbox selection

  1. I have a form which appears on a single post page, which when submitted needs to be sent to 1 of 2 email addresses. The choice is made when the post is added via 2 checkboxes.

    Is it possible to send an email to specific address based on a custom field check box selection?

    Posted 6 years ago on Thursday January 3, 2013 | Permalink
  2. David Peralty
    Administrator

    You can use Routing. In the notifications section, look for the word routing. Then you can set where an e-mail notification goes based on a form selection.

    Posted 6 years ago on Thursday January 3, 2013 | Permalink
  3. David, thanks for your prompt reply.

    I dont think i have explained very well. The choice of email the form is submitted to is made on the post screen of WordPress by the person adding the post, not by the end user.

    Routing is definitely the way to go but i need to be able to dynamically populate it based on the custom field checkbox selected on the post screen.

    Hope that makes sense.

    Posted 6 years ago on Thursday January 3, 2013 | Permalink
  4. David Peralty
    Administrator

    Okay, so you would want to have a field in your form that is a hidden field, and then using PHP pass the value of the custom field to that hidden field. This is a bit complex to do, and will probably require an intermediate level of PHP skill to accomplish.

    Have a look at our gform_pre_render:
    http://www.gravityhelp.com/documentation/page/Gform_pre_render

    Posted 6 years ago on Thursday January 3, 2013 | Permalink