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.

Dynamically populate post name into hidden field?

  1. Gil Namur
    Member

    Hi again,

    I read this thread "Gravity Form Based Auctions" where how to Dynamically populate postID into hidden field via theme functions.php file is described.

    http://www.gravityhelp.com/forums/topic/gravity-form-based-auctions

    What tweak would I do to that code to Dynamically populate the post name (title) into a hidden field?

    Just to be clear ..

    I need the Post Title to appear at the top of the published form. So if I am selling a Blue Widget, ( and the post is called Blue Widget) the form would have

    Blue Widget

    Small - 24.95 - (qty) ( I know how to do this part!)

    Thanks and cheers,
    Gil

    Posted 13 years ago on Thursday July 14, 2011 | Permalink
  2. What type of field are you wanting to populate with this value? Because there is already a merge tag for default values that will return the Post Title for the post you are on. It's called {embed-post:post_title} and it's one of the default values available in the "Insert variable" drop down for setting up the Default Value of a field.

    See this screenshot: http://i.imgur.com/gwnYR.png

    Posted 13 years ago on Thursday July 14, 2011 | Permalink
  3. Gil Namur
    Member

    Ahem .. (blush) ... H O W did I miss THAT!!!!!!!

    Thanks Carl!

    Cheers,
    An embarrassed Gil

    Posted 13 years ago on Thursday July 14, 2011 | Permalink