Discussions

Expand all | Collapse all

Embed a Web Page in a Form

  • 1.  Embed a Web Page in a Form

    Posted 01-21-2019 02:44
    We are auditing data that is on the internet.  Our records contain data that is available on websites we subscribe to.  The data is provided to us and we are to compare it to the data that is on the website.  It would be helpful if we could see the web page that we are auditing on a tab in our form so it would be next to our data.  The perfect option would be similar to the Web Page Widget for Quickbase pages.  Each record would have its own unique URL to view.  Is there a way to make this work with a Formula Rich Text Field?  Thanks in advance for any help. 


  • 2.  RE: Embed a Web Page in a Form

    Posted 01-21-2019 11:56
    > Is there a way to make this work with a Formula Rich Text Field? 

    Yes you can do this with one Formula Rich Text Field with no additional setup other than having a field for the [URL]. Live Demo here:



    Web on Tab ~ Display Record 1
    https://haversineconsulting.quickbase.com/db/bpbzpm7w6?a=dr&rid=101

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

    Notes:

    (1) The URL must use the https protocol.

    (2) Some domains do not allow you to place their URLs within <iframe>s because they set a response header that requires the <iframe>'s src URL to have the same origin as the page hosting the <iframe>:


    This happens for https://google.com for instance:

    https://haversineconsulting.quickbase.com/db/bpbzpm7w6?a=dr&rid=102

    (3) The Rich Text Formula field [Web] has the following formula (which uses the 3Q&S Technique):
    "<img data-url='" & [URL] & "'" &
    " src onerror='
    (async () => {
      var url = this.dataset.url;
      this.outerHTML = '<iframe src=${url} width=800px height=600px></iframe>';
    })();
    '>"

    (4) [Web] should be configured to that it does not show up on reports and is not searchable:




  • 3.  RE: Embed a Web Page in a Form

    Posted 17 days ago
    I get a blank gray window displaying when trying this.

    Here is my code in a Rich Text field:

    "<img data-url='" & [GCs Form URL] & "'" &
    " src onerror='\n(async () => {\n var url = this.dataset.url;\n this.outerHTML = '<iframe src=${url} width=800px height=600px></iframe>';\n})();\n'>"

    [GCs Form URL] is a URL formula type field and I've tested the link and it works. Any help?

    ------------------------------
    Mackenzie Phillips
    ------------------------------



  • 4.  RE: Embed a Web Page in a Form

    Posted 17 days ago
    Is your website HTTPS or HTTP. Only HTTPS has a chance of working.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 5.  RE: Embed a Web Page in a Form

    Posted 17 days ago
    It is https

    ------------------------------
    Mackenzie Phillips
    ------------------------------



  • 6.  RE: Embed a Web Page in a Form

    Posted 17 days ago
    I suggest that you switch gears and change your method.

    I suggest that you download the app from the exchange called Magic Buttons. In that app Kirk Trachy has clear examples of how to embed web pages on a form and he even has an a sample of embedding a YouTube video on a form.

    Please post back to this thread if you have any problems with that method or also post back once you get it working.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 7.  RE: Embed a Web Page in a Form

    Posted 17 days ago

    Yes, I got the solution I need from this app.

    1. I created a URL formula field with the URl and "&ifv=1" to crop out page headers

    2. I created a Rich Text field with the code

    "<iframe width=\"1300\" height=\"800\" frameborder=\"0\" marginheight=\"0\" marginwidth=\"0\" src=\"" & [url] & "\" allowfullscreen></iframe>"&"<p></p>"

    3. and then a report link field that connected that to the rich text field. Displayed the report link field in the form. 

    Thank you!



    ------------------------------
    Mackenzie Phillips
    ------------------------------



  • 8.  RE: Embed a Web Page in a Form

    Posted 17 days ago
    Well done!  And much simpler syntax than the other approach.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 9.  RE: Embed a Web Page in a Form

    Posted 01-21-2019 15:03
    Ok AWESOME!  Works perfectly, thanks Dan.


  • 10.  RE: Embed a Web Page in a Form

    Posted 02-14-2019 04:42
    Hi Dan, does this method work for videos, for instance, on Youtube? When I try substituting a Youtube URL it fails to connect.


  • 11.  RE: Embed a Web Page in a Form

    Posted 03-08-2019 16:52
    This is EXACTLY what I was looking for. It's able to reference custom HTML Code Pages.