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.

Custom Meta Boxes text in e-mail

  1. Hi,

    I created and use Custom Meta Boxes for date and place in single post. When a user fill in a form in the post, he receives an e-mail with a message and everything he filled in.

    I would like to include in this e-mail also information about the place and date. Is there a chance how to print this into the e-mail?

    Posted 11 years ago on Monday April 8, 2013 | Permalink
  2. Anyone? Is it understandable what I wrote?

    Posted 11 years ago on Wednesday April 24, 2013 | Permalink
  3. David Peralty

    Sorry, I don't understand what you are looking for help with. Can you give me more information please?

    Posted 11 years ago on Wednesday April 24, 2013 | Permalink
  4. Hi David,

    I created printscreens with description (see link below). I hope it will be more understandable now.

    Link: printscreens with description

    Posted 11 years ago on Thursday May 9, 2013 | Permalink
  5. Can anyone help me, please? Do you understand the screenshots with comments?

    Posted 11 years ago on Thursday May 30, 2013 | Permalink
  6. David Peralty

    To grab custom field values from the post/page you have to use PHP code and our gform_pre_render hook to push the values to those fields.

    1.) Make sure the field have checkmarks in the "allow populate dynamically"
    2.) Add gform_pre_render hook to your theme's functions.php file. http://www.gravityhelp.com/documentation/page/Gform_pre_render
    3.) Get the post meta - http://www.wprecipes.com/wordpress-how-to-get-custom-fields-outside-the-loop
    4.) Insert the values into the fields you want them in.

    I hope that helps.

    Posted 11 years ago on Thursday May 30, 2013 | Permalink
  7. Thanks David.

    Step 2: I copied:
    <?php
    add_filter("gform_pre_render", "pre_render_function");
    ?>
    and placed it in my functions.php

    Then I got error:
    Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'pre_render_function' was given in /home/www/zbyseknadenik.cz/subdomeny/projekty/autopatie/web/wp-includes/plugin.php on line 173
    Oops! We could not locate your form.

    Sorry, I'm not a programmer...

    Posted 11 years ago on Thursday June 20, 2013 | Permalink
  8. David Peralty

    What does your function look like? Did you put this in your theme's functions.php file?

    Posted 11 years ago on Thursday June 20, 2013 | Permalink