Forum Discussion

MrunaliKadam's avatar
Qrew Trainee
3 years ago

Include/add pdf flyer on the form


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

5 Replies

  • Do you want to embed the PDF on the form or have a link to it?

    Mark Shnier (YQC)
    • MrunaliKadam's avatar
      Qrew Trainee
      Want to embed the pdf..

      Mrunali Kadam
      • MarkShnier__You's avatar
        Icon for Qrew Legend rankQrew Legend
        This should get you started. It my own cheat notes which you can adapt.

        Step 1.

        Create a Code page called iframe.html

        <iframe id="kirk" style="height:100%;width:100%;border:none;overflow: scroll;"></iframe>


            const urlParams = new URLSearchParams(;
            const rid = urlParams.get('rid');
            const tabledbid = urlParams.get('tabledbid');
            const myurlroot = urlParams.get('myurlroot');
            const fileattachmentfid = urlParams.get('fileattachmentfid');
            const src = "" + myurlroot + "/up/" + tabledbid + "/a/r" + rid + "/e" + fileattachmentfid + "/v0&embedded=true"; 

        document.getElementById("kirk").src = src

        Step 2
        Create this field called Attachment type.
        var text Suffix = Right([Receipt Photo or Attachment],".");

        var text NonPhotoFileType = 
        "xls", "File",
        "xlsx", "File",
        "pdf", "File",
        "doc", "File",
        "docx", "File",
        "ppt", "File",
        "pptx", "File");

        Trim([Receipt Photo or Attachment])="","",
        $NonPhotoFileType<>"", $NonPhotoFileType, "Image")


        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#]

        // This field refers to iframe.html that is located in the pages section of this app. You will need to copy that code page into your app.
        // You will also have to copy the code from this button and update it for your button to reflect what your file attachment's field id (fid) is.  This this example the file attachment is 432.  Yours may be different.
        // Also be sure to "Allow open access     Allow access to this file attachment from a Quickbase link without signing in".  Edit the file attachment field properties and check the checkbox. Gviewer needs to be able to see the file in order to render it.

        Mark Shnier (YQC)