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.

field content template

  1. hi I don't know exactly what to ask so I'll explain. I'm making a site where people can add videos from sources like youtube or google video directly into a post, I'm using the wordpres video plugin and the way it works is that the viedo is embed with a shortcode like [youtube videoID width height] and for google video is [google videoID] The fist thing I tried was for the user to put the video id into a text field and put it on the content via content template, and use the field of the video source so the content template ended something like this: [{Source::5} {ID video:19} 500 400] but the problem is that google video doesnt work with width and height so the video wont show. The next thing I tried was to make sa separate field for each kind of source, to show with conditional logic and put all of the sources on the content template but the problem was than i ended with extra strings like this [ 500 400], so i thougt that with a custom fiel i could create a content template for that field and use it on the post content template, but it didn't work, the field doesnt apear at all on the content, so i see two solutions one is to use the value of a drop down field on the content template, so i could populate it with something like 500 400] and use it on the post content template, that or is there a way to save a field depending on the value that is entered, for example if i enter "www.youtube.com/watch?v=l8DQCBewszY" the field gets saved like [youtube l8DQCBewszY 500 400] and if I enter "http://video.google.com/videoplay?docid=8883910961351786332" the field gets saved like [google 8883910961351786332] or maybe there is an easier way to make embed videos through a gravity forms field? thanks!

    Posted 12 years ago on Tuesday January 10, 2012 | Permalink
  2. ok I found that the value from a drop down field value is used like this

    {My Merge Tag:1:value}

    So Is there a way I can put the content template value of a custom field on the post body content template? And how can I manipulate the content of a field before after its entered? so that if i enter http://www.youtube.com/watch?v=l8DQCBewszY the field is saved like: [youtube l8DQCBewszY 500 400] ? Or is there an easier way to embed videos?

    Posted 12 years ago on Tuesday January 10, 2012 | Permalink
  3. this is my form http://consiente.org/new

    Posted 12 years ago on Tuesday January 10, 2012 | Permalink
  4. Please point me on the right direction i learn fast!

    Posted 12 years ago on Wednesday January 11, 2012 | Permalink
  5. With oEmbed support in WordPress, I wouldn't mess with shortcodes at all any more. Just post the URL right into the content body, and make sure your media settings wp-admin > Settings > Media (wp-admin/options-media.php) allow "Auto embeds". That will tell WordPress to scan the content for automatically embeddable content.

    If that will work for you, that will be easiest. If you need more control over how the videos are embedded, you will have to process the submitted value with gform_pre_submission and parse the URL being submitted to put it in a format your other plugin can use.

    Posted 12 years ago on Wednesday January 11, 2012 | Permalink