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 do I... populate my title post field dynamically with a youtube title?

  1. pjeaje
    Member

    How do I... populate my title post field dynamically with a youtube title?

    If I provide a link of a youtube video in one of my custom fields post fields can GF somehow get the title of the video and put it into the title?

    Thanks.

    Pete

    Posted 12 years ago on Saturday July 14, 2012 | Permalink
  2. How does the video URL get into the custom field, and how does Gravity Forms access that? Is the custom field in the post where the Gravity Form is embedded? Please provide more information about what you're trying to do.

    You can get the video title from YouTube URL using the YouTube API:
    http://stackoverflow.com/questions/2478391/get-youtube-videos-title-with-jquery-using-youtube-api

    You'd have to have some code in your theme's functions.php and use the gform_pre_render filter to take the URL of the video and get the title from YouTube and pre-populate the post title in your form. I'm not sure where the video URL comes FROM at this point.

    Posted 12 years ago on Sunday July 15, 2012 | Permalink
  3. pjeaje
    Member

    How does the video URL get into the custom field
    "... I provide a link of a youtube video in one of my custom fields post fields"

    Posted 12 years ago on Sunday July 15, 2012 | Permalink
  4. I'm unclear on that part. Can you please explain this? Is the form going to be embedded into a post which has a custom field which stores the video URL? So, the Gravity Form needs to read the meta key and meta value for the post in which it's embedded? Is that accurate? Thanks.

    Posted 12 years ago on Sunday July 15, 2012 | Permalink
  5. pjeaje
    Member

    Sorry, yes that's what i mean.

    Posted 12 years ago on Sunday July 15, 2012 | Permalink
  6. revonorway
    Member

    Any leads on this one? Would be interested to do something similar.

    Posted 12 years ago on Tuesday October 16, 2012 | Permalink
  7. @revonorway, please begin a new topic for your situation and explain what it is you would like to do exactly. Thank you.

    Posted 12 years ago on Tuesday October 16, 2012 | Permalink