Exact Forms Plus!
Include images in your documents
Images can be included in the generated document for both the Master Record data as well as for Related Table data.
Static images or images that do not vary from document to document can be inserted directly into your template using Insert/Picture functionality within Word. An example of a static image might be your company logo.
Dynamic images or images that may change from document to document can be stored in Quickbase and inserted into your document during the document creation process.
Image files can be located in the following locations:
In a file attachment field in the Master table.
In a file attachment field in any Quickbase table, in any Quickbase app.
In Amazon S3.
On a separate web server—like a link from your website.
How to reference images in the Master section of your template
You can reference an image field using its field id as well as a pixel size. For example, if you have an image file in your PO table and its field id is 23, you would reference it like this: ~i:23:100~. The i tells Exact Forms Plus! to expect the field to be an image, 23 is the field id of the image in the PO table to use, and 100 is the pixel size to use when including the image in the document. Field names cannot be used when including images in the document—use the field IDs instead.
Sizing options:
~i:23:100~—Sets the width of the picture to 100 and recalculates the height proportionally.
~i:23:100x50~—Sets the width to 100 and the height to 50, which could produce a distorted image.
~i:23:25%~—Reduces the image's width and height by 25%.
~i:23:25%F~—Resizes the image to a fixed percentage of itself, 25% of its original size.
Tip
If you are using file attachment fields and not all of your records have a file in the file attachment field, the rendered document still has ~i:23:100~ after Exact Forms Plus completes. To prevent this, create a separate formula text field and place the following code in the formula: If ([File]>"","~i:23:100~","") Then reference this new field in your template as ~24~ (assuming 24 is the field id of the new field you created).
Important
If using this concept, make sure field 24 is referenced before field 23 in the clist, like clist=3.4.5.24.23.25.26.
Include an image from a file attachment field in a separate Quickbase table
An example of how to include an image in your document where the image itself is stored in a file attachment field in some other Quickbase table.
Create a formula Rich Text field.
In the formula code create a reference to the file attachment field.
Ex: "<div><img src=\""&URLRoot()&"up/"& [_DBID_OTHER_TABLE]& "/a/r"& [OTHERTABLE Record ID#] &"/e51/v0\"></div>"
Note
e51—51 is the field id of the file attachment field in the other table.
Important
Do not include height and width or any other attributes within the <img> tag. Including those attributes prevents the image from displaying in the document.
Create another formula text field to use in the template, in case a record doesn't have a file.
Ex: If([Logo Uploaded], "~i:142:100~", [Client Name]) //[Logo Uploaded] is a lookup field from the table where the file attachment field is located. Its formula is something like this: If ([Logo]>"",true,false)
Note
143 is the field id of the rich text field created in the previous step. This uses the value in the [Client Name] field if there is no file in the file attachment field.
In the template, reference the field created in the previous step, like this: ~143~
Add a hyperlink to an image in your document
You can include hyperlinks for images that appear in the document by adding the <a href> tag to your formula code.
Example:
File Attachment field is field id 51 and the name of that field is File
Create a Formula Rich Text field with this formula:
If([File]>"","<div><a href=\"http://www.juicedtech.com\"><img src=\""&URLRoot()&"up/"&Dbid()&"/a/r"& [Record ID#] &"/e51\"></a></div>")
Note
You cannot include both text and an image in a single Formula Rich Text field. The text is ignored, and only the image displays in the output document.
Include images with Base64 encoding (data URI)
When an image is included in a Rich Text field as an encoding string, Exact Forms Plus treats this just like it does regular HTML or Rich Text fields. This may be the case if you pasted an image into the Rich Text field.
In the master section of the document, do not use the ~i:99:100~ formatting in the document template—refer directly to the Rich Text field by field id or name. For example: ~99~
In the subtable section of the document, do not use the Image type in the EFP Configurator for the Rich Text field that includes the data URI. Set the type to Rich Text instead.
Include images in subtables
How to include images in the Child section of your template (also called the Related Table Data section, or Subtable)
You do not use the ~i:142:100~ concept, as in the Master section of the template, when including images in Subtables. Instead, specify in the Subtable clist parameter that you want to display data from a specific field as an image.
For example: CI142:50—in the clist, this reads as Center and display as an Image the file referenced in field id 142, sized to 50 pixels.
Images can come from the same range of locations as Master images.
In a file attachment field in the Child table.
In a file attachment field in any Quickbase table, in any Quickbase app.
In Amazon S3.
On a separate web server—like a link from your website.
Example: Create a formula Rich Text field. Use the following code in the formula:
"<div><img src=\"https://images.quickbase.com/si/24/222-point_green.png\"></div>"Important
Do not include height and width attributes within the <img> tag.
This links to a green circle in the Quickbase image library.
When using the EFP configurator to configure the Subtable data and formatting desired, choose the field you created and select the Image type in the field properties for that field.
EFP Configurator creates a clist entry like this: CI142:50 (assuming the field id of the new field you created is 142)
For more information about the clist parameter, see Including Related Data.
Advanced subtable images
If you want to include text above or below an image in a Subtable column—like a title, label, or caption—here's how:
Create a new formula Rich Text field in your child table.
In the formula code, include the following (this example shows text above and below the image):
//H3 and H4 tags tell EF+ to include text and image together
//H3 tag is used to display text above the image
//H4 tag is use to display text below the image
"<div><h3><b>This is some text</b><br />and some more text<br /></h3><h4>And text for the bottom</h4><img src=\"" & URLRoot()&"up/"& Dbid()& "/a/r"& [Record ID#] &"/e21/v0\"></div>"In the EFP Configurator, when selecting this new field to display in the subtable, set the field type to Image, not Rich Text.
This is how the images appear in the Subtable of the EF+-generated document.

This example shows all available options:
Image by itself with no text—do not include H3 or H4 tags in the formula.
Image with some text above it—include the H3 tag only in the formula.
Image with some text below it—include the H4 tag only in the formula.
Image with both text above and below—include both H3 and H4 tags in the formula, as shown in the earlier code sample.