Report Link saying youtube.com refused to connect.

  • 38
  • 1
  • Question
  • Updated 2 months ago
  • Answered
Goal:   I want to put a URL in the URL field and have it show the video within the Form. 

Current Solution:    URL Field,  Rich Text Formula Field,  Report Link. 


Formula in the Rich text Formula field is as follows.  "<iframe width=\"560\" height=\"315\" frameborder=\"0\" marginheight=\"0\" marginwidth=\"0\" src=\"" & [Reference] & "\"></iframe>"

Note: ([Reference]  is the URL field)


Report Link  is linked to the formula Rich Text Field. 



Report Link Currently displays  www.youtube.com refused to connect.   

Link in the URL field has been changed multiple times.  but it is currently https://www.youtube.com/watch?v=G9nY5iP1g_4





Photo of Billy Bussey

Billy Bussey

  • 150 Points 100 badge 2x thumb

Posted 2 months ago

  • 38
  • 1
Photo of Chayce Duncan

Chayce Duncan

  • 392 Points 250 badge 2x thumb
The only place that I know of that Quick Base natively supports <iframe> is on a dashboard. Rich Text fields don't support the <iframe> tag. If you need it to appear on the form your best bet is to use the Image OnLoad technique and use it to script your own HTML into part of the page. There is an article by Dan Diebolt from a while back that illustrates how to implement an <iframe> and I copied his original set up post on how to set up IOL in a form to take a look at as well.

iFrames: https://community.quickbase.com/quickbase/topics/embedding-an-iframe-within-a-quickbase-form
IOL setup: https://community.quickbase.com/quickbase/topics/how-do-i-setup-the-image-onload-technique-iol
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 29,014 Points 20k badge 2x thumb
Just put this rich text formula field in your table:
"<img src onerror='this.outerHTML=\"<iframe width=560 height=315 src=https://www.youtube.com/embed/" & [Youtube ID] & " frameborder=0 allowfullscreen></iframe>\"'>"
That's a pretty sweet formula if you ask me.



Embed YouTube Video ~ Videos Table
https://haversineconsulting.quickbase.com/db/bn7q5pvxg?a=td

Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=693

(Edited)
Photo of Billy Bussey

Billy Bussey

  • 150 Points 100 badge 2x thumb
Thanks guys for the input.  Ⲇanom the ultimate (Dan Diebolt)   That is actually an amazing piece of code.  So what I have discovered if you notice in my link that I posted above that that link is not an "embeddable" if you will, URL.  So Dan your piece of code works very well.  Making it simple for a person  looking for the youtube ID though is a little different. (I know its not really that difficult but in my situation it is lol)   So what I did is I used a slightly simpler solution but is essentially the same thing.  

I just made it so that you just copy the embed code as a whole and place it in the URL field which literally requires no code at all.   Just a  copy of the URL field and the report Type shows the video perfectly.   The window size is the only thing  that method does not allow you to customize it just comes through as youtubes standard window size. Which works for me but maybe not someone else.