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.

Adding referred page title to form

  1. Guys,

    I know I can dynamically include the current page title etc within a form but, how can I include the referring page title within a form?

    Example:
    I am on page "Pack of screws"
    I click the 'contact' button which takes me to the contact form.
    Pre-populated in the form is the title 'Pack of screws'.

    I have tried using the custom field and title elements under Post fields but so far no joy.

    TIA

    Posted 10 years ago on Thursday May 30, 2013 | Permalink
  2. David Peralty

    You would have to use PHP and code this yourself. You would want to get the HTTP Referrer and have a field in your form to collect the details. You'll want to make sure this field has "allow populate dynamically" checked, and then use gform_pre_render in your theme's functions.php file to grab the referrer and push it to your field.

    Posted 10 years ago on Thursday May 30, 2013 | Permalink