Skip Navigation

[Resolved] add Youtube video to form and display as video in template

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to allow Users to submit the URL of a YouTube video using Forms, and display the YouTube video in my Content Template.

Solution: Create an "embed" type custom field, and insert that field in your Form. Display the video in your template using the Toolset YouTube block, with a dynamic source pointing to the embed field.

Relevant Documentation: https://toolset.com/block-item/youtube/

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 6.45 hours from now. Thank you for your understanding.

Author
Posts
#1969137

Hi there,
Is it possible to add a link to a youtube video in my form "create camp" and then display the link as a frame (where you see the video and not just the link) on the content template?

#1969139

I dont want the user to upload the video directly to the page so i thought they could uploade on youtube and get the video from there

#1969657

Christian Cox
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Hi, you can use the "embed" custom field type to accomplish the behavior you have described. First, create an "embed" custom field for this post type. Then in the Form to create or edit these posts, insert the embed custom field in the Form builder. If you create a new Form after adding the custom field in Types, the YouTube video field should be inserted in the Form Builder automatically.

Then on the front-end, the User will enter the standard URL of their YouTube video in the Form. In your template, you should display the YouTube video using a Toolset YouTube block. Please note there are two YouTube blocks available in the Block Editor, and you must choose the Toolset YouTube block (orange icon) to display dynamic content from an embed custom field.

#1969659

Christian Cox
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

More information about the YouTube block here: https://toolset.com/course-lesson/youtube-videos-with-advanced-options/

#1971401

Hi Christian,

I created the "embed" custom field but it does not show up in the post form for me to add to the form. Can you help?

#1971403

Sorry! Found it

#1972201

Christian Cox
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Great, if that's working as expected now I think we can close out the ticket here.

#1972901

My issue is resolved now. Thank you!