Skip to main content
Question

iframed PDF in a Form

  • March 9, 2023
  • 0 replies
  • 586 views

AdamKeever1
Forum|alt.badge.img+2

We have a form for requesting meals to be ordered from a vending service for when we have guests and such. Previously the menu was in the form as a formula URL that had the link to the menu as an attachment from a resources table.

I was asked to update the menu. That's when I learned that employees would click the link in the form and the attachment would download and then they would have to open the file to view the menu. Not optimal.

I did some research and found a way to embed the PDF menu in the form as an iframe.

Here's how:

  1. upload the pdf to a file attachment field
  2. create an HTML page
  3. toggle the HTML button so you can add code
  4. add this code to the HTML page
    •  <iframe src="https://docs.google.com/gview?url=COPY&PASTE_YOUR_PDF_ATTACHMENT_URL_HERE&amp;embedded=true" width="600" height="650" frameborder="0" target="_blank"></iframe> 
  5. create a formula URL field
  6. add this formula
    • URLRoot() & "db/" & AppID() & "?a=dbpage&pageid=20"
    • change the 20 to your page ID number
  7. check the embed as iframe box and set the window size

That's it.

For additional optimization I used text HTML to wrap the iframed menu and other fields into a table, table row, and table cells so that the menu is to the left of the fields where the requested items are inputted.

And now life is a little easier for my colleagues:

Enjoy.



------------------------------
Adam Keever
------------------------------
This topic has been closed for replies.

Adam, this is awesome! Just curious if it's possible to tell it to open whatever is in the file attachment field - not a specific file url? This is the closest thing to a solution that I've found anywhere, but need it to just show whatever file is in the file attachment field. Think document library. Any ideas?



------------------------------
Sherry Blackburn
Sr. Applications Systems Analyst (Quickbase at PeaceHealth)
PeaceHealth
------------------------------