Skip to main content
Question

Include/add pdf flyer on the form

  • May 10, 2022
  • 0 replies
  • 236 views

Hi,

I've created a pdf which has instructions for user so they can successfully submit the form. Now looking for solution/ideas to include this pdf flyer on the form. 

Please advise.

------------------------------
Mrunali Kadam
------------------------------

MarkShnierYou
Forum|alt.badge.img+24
Do you want to embed the PDF on the form or have a link to it?

------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------

Forum|alt.badge.img+5

Hey Mark, 

I have a file attachment field that we are uploading PDF's to and I am trying to view it on the new forms.  I was trying to use your solution but I can't figure out how to use the quickbase file field instead of the googledoc in your example.  I got the code page to work with one file url but I need it to be dynamic.  

I am using your code page formula and other fields in the example, and I am attempting to update the const src to be the Quickbase file attachment field?  Is that the right line to update? , I couldn't understand your last comment.  This is the code I got to work for one file attachment but I need it to be dynamic and not just one record ID.  

const src = "https://realm.quickbase.com/up/tableID/a/r/e/v0/url=+ myurlroot + "/up/" + tabledbid + "/a/r" + rid + "/e" + fileattachmentfid + "/v0&embedded=true";

Thanks

Jennifer


MarkShnierYou
Forum|alt.badge.img+24

This code was probably created by the famous Kirk Trachy, a sales engineer at Quickbase who is now retired.

Did you make the code page exactly the way I posted it?

Did you make the URL field exactly like this?

Create the URL field type for the form. Type = URL . Set as iframe.  Set  800 by 800 size.

If([Attachment Type 1]="File",

URLRoot()&"db/"&AppID()&"?a=dbpage&pagename=iframe.html&rid="&[Record ID#]
&"&tabledbid="&Dbid()
&"&myurlroot="&URLRoot()
&"&fileattachmentfid=9")

 

The only thing you should change in the above code would be to change the 9 to the field ID in your Table, which holds the file attachment  

 

 


Forum|alt.badge.img+5

Hey Mark,

Been away for a few days.  I built everything shown as above but it shows up as no preview available.  The "Attachment Type" is that supposed to be a text formula? 

I did notice that the URL formula that was posted has the "If([Attachment Type 1]="File"", but we named the field "Attachment Type," I just assumed that was a typo as when I add the 1 it doesn't recognize the field. 

The Attachment type does say File and the code page does seem to be pointing to the right place but its not showing up. 

Any thoughts? 

Thanks
Jen


MarkShnierYou
Forum|alt.badge.img+24

I have never never tested this on new forms so it may not work. Can you just quickly mock up the bare minimum on a legacy form style and let me know if it works.


MarkShnierYou
Forum|alt.badge.img+24

Hi Jen, I did a fast test and it still works on new forms.  Can you contact me at mailto:mark.shnier@gmail.com and I will jump on a zoom call with you.


MarkShnierYou
Forum|alt.badge.img+24

Also super important.  You need to check the box on the file attachment field properties to allow viewing the document without logging in.  That is because google needs to pull the document to display it.