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: Add merge tags into form description/title

  1. Recently I had a situation where I wanted to use one form on many pages but wanted to include the post title in the form description. For example. Inquire about [SERVICE NAME] that way I could use just one form for all pages but have them appear unique. The solution gform_pre_render Here is the code I used:

    add_filter("gform_pre_render", "gf_description_merger");
    function gf_description_merger($form) {
            $form['description'] = GFCommon::replace_variables($form['description']);
            return $form;
    }

    Pastebin

    This could most likely be applied to the title and or anywhere else merge tags would like to be used.

    Posted 11 years ago on Wednesday October 17, 2012 | Permalink
  2. That's pretty interesting. Thank you for that code. Nice to see you around still :-)

    Posted 11 years ago on Wednesday October 17, 2012 | Permalink