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.

Email notification 'Send to Email' address pulled in from post custom field

  1. Any suggestions would be great thanks.

    On my wordpress site, I have lots of post containing the same form. But each of my posts has a 'custom field' containing a post specific email.

    Now within the email notification setup panel. You can select {post_id} and a {post_edit_url} short code to pull in the in the post information from the current post that the form is on. This is great however...

    Is there anyway that I could pull in the post 'custom field' containing my post specific email address, into the email notification setup panel, and place the short code in my 'Send To Email' field. The recipient address area.

    The idea, is when some one fills in the form, from the site front end. The persons email which is assigned to that specific post containing the form, will get the notification.

    I could be missing a trick, but in and ideal world, the email notification shortcode would look like this:

    {post_custom_field:name} name being the custom field name :-)

    Any work arounds for this idea? Thanks in advance.

    Josh

    Posted 13 years ago on Monday March 28, 2011 | Permalink
  2. {embed_post:post_title} and {embed_post:ID} are the short code snippets I meant in the above post.

    So is it possible to make a short code snippet to pull in custom fields or any work arounds?

    Example: {embed_post:post_custom_name}

    Thanks

    Posted 13 years ago on Tuesday March 29, 2011 | Permalink
  3. If you are running Gravity Forms v1.5 try this:

    {custom_field:KEY}

    I don't even know if this has been tested or documented on our end, it's bleeding edge and wasn't referenced in the launch announcement. Change KEY with the post meta key for the custom field you want to display.

    Let me know how it goes.

    Posted 13 years ago on Tuesday March 29, 2011 | Permalink
  4. Hi Carl, Thanks for the fast response!

    I had ago, got my KEY for the custom field containing the email.

    {custom_field:1108}

    So I put this snippet in the notification email recipient address field. I Tested the form and got no notification. Popped the same snippet in the email body and put my email as the recipient. I got the email but it leaves a blank. Doesn't return the custom field.

    I double checked custom:KEY numbers. They we're cool but no return :-(

    Any ideas?

    Thanks again!

    Posted 13 years ago on Tuesday March 29, 2011 | Permalink
  5. I just had a fresh look at this again this morning. When you said 'key' I thought you meant the individual key for the custom field. I checked the key numbers for my custom fields used in my posts. Even tho the custom field names we're the same, the keys were all different. (of course)

    So I just tested the short code with Custom Field name (including spaces) in the key section.

    {custom_field:My Custom Field Name}

    This is probably what you meant for me to try but I got confused.

    This WORKED just like I wanted it to! Very very powerful stuff!!!

    Thanks so much for your help!
    Josh

    Posted 13 years ago on Wednesday March 30, 2011 | Permalink
  6. Yes the Key is the Custom Field Name. The Name is stored as the Key in the database so with post meta/custom fields you may see people refer to it as the Name or Key. Because it's stored as a Key (the name) / Value pair in the database.

    Posted 13 years ago on Wednesday March 30, 2011 | Permalink
  7. This may be off topic, but does that mean that I could collect a text area in a form that holds a series of emails addresses, and then use it in the notification by placing a short code in there? Is that possible?

    Posted 13 years ago on Wednesday March 30, 2011 | Permalink
  8. Shortcodes are only supported in the Notification Message itself, not in the To/From/CC/BCC/Subject fields. What is described above are the form field variables.

    If you are talking about the form field variable, then yes you could do that. Form field variables can be used in the To/From/CC/BCC/Subject fields to dynamically populate them with form data.

    However, if it was a textarea that contained the email addresses you can't be sure they are in the correct format if you didn't use the Email field which has validation for email addresses built in.

    Posted 13 years ago on Wednesday March 30, 2011 | Permalink
  9. I thought the only fields I could use in the To/From/CC/BCC were those of type Email. Has that changed? Wasn't it a drop down that only showed those types of form fields? Am I off here?

    Posted 13 years ago on Wednesday March 30, 2011 | Permalink
  10. chezolio
    Member

    Is there anything special I need to add to make that work if I'm embedding the form via php function call? My custom fields aren't populating my form fields

    Posted 13 years ago on Wednesday March 30, 2011 | Permalink
  11. We'll have to look into it. There may be an issue doing so via the function call vs. shortcode because of how WordPress executes. I'll try to replicate it on my end and take a look.

    Posted 13 years ago on Wednesday March 30, 2011 | Permalink
  12. Ahh bummer... Yes the short-code does not work in the To/From/CC/BCC fields.

    I was totally off track for some reason. My idea is flawed.

    But hey this custom field from current post short-code is very good.

    But suggestions about how maybe I could get the To/From/CC/BCC email pulled in from the post/page (which the form is on) would be awesome.

    Thanks

    Posted 13 years ago on Thursday March 31, 2011 | Permalink
  13. @provdes Store the value of the post/page custom field in a hidden form field. Then use that form field variable in the To/From/CC/BCC field.

    Posted 13 years ago on Thursday March 31, 2011 | Permalink
  14. Great idea, worked like a beaut! Thanks so much for your quick support. Such an awesome plugin!

    Posted 13 years ago on Thursday March 31, 2011 | Permalink

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