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.

How to pass in a pre-populated value via the php function call

  1. LumpySimon


    Think I must be doing something obvious wrong here but can't figure out quite what...

    I've got a variable called $page_title that I want to pass into a hidden field in a 'Tell to Friend' form (ID 2) which is shown using the php function call.

    I've added a field called 'Page Title', clicked 'allow field to be populated dynamically' and am calling the form like so:

    gravity_form( 2, false, true, true, array( 'page_title' => $page_title ), true );

    But when I display the form field in the auto-responder email it's always blank.

    Any pointers much appreciated!


    Posted 11 years ago on Tuesday April 26, 2011 | Permalink
  2. Hi Simon,

    In addition to checking the "Allow field to be populated dynamically" option, did you also enter "page_title" as the parameter?

    Posted 11 years ago on Wednesday April 27, 2011 | Permalink