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.

Display Custom Field already set in post in Notification email

  1. go4
    Member

    Hi,
    I'm setting up some forms for a client and would like to include a custom field value in the notification email they receive.

    The custom field is set by post author when the post is created and NOT through data submitted in the form. I can't get the value of the field to appear in the notification email though. I've tried adding a hidden and/or an admin-viewable only field to the form and then inserting the value in the notification email with no luck.

    Am I missing something obvious?

    Thanks.

    Posted 10 years ago on Monday May 17, 2010 | Permalink
  2. You need to add a hidden field to your form and then use an API hook to dynamically populate the value of that field.

    You have to first set the field to be able to be populated dynamically (under the advanced tab when editing that field) and give it a parameter name. Then you have to use PHP you place in your themes function.php file to pre-populate it.

    See some of these threads:

    http://forum.gravityhelp.com/topic/post-title-automaticly-into-form#post-4217

    http://forum.gravityhelp.com/topic/hidden-field-use-tip-and-a-question

    http://forum.gravityhelp.com/topic/pre-populating-hidden-form-field-problems#post-1256

    You can also search the forums for "prepopulate" and "pre-populate" to find more threads on this subject.

    Posted 10 years ago on Monday May 17, 2010 | Permalink
  3. go4
    Member

    thanks Carl

    Posted 10 years ago on Monday May 17, 2010 | Permalink