Document templates are part of the Document Creation feature. Anyone with permission to build or edit apps can build a template that determines how data is presented when an app user generates a document based on a record.
This article covers how to create a template and formatting options.
In this article
Create a template
- Go to the table settings for the table you want to add a template to. Select Document templates.
In sidebar navigation, select the three dot more menu that appears on the table name on hover. This menu shows several shortcuts to table settings, and Document templates is in the list.
- Select New template.
- Add a name for your template. Optionally, add a description.
- Add content to the template.
- Select Save.
Add content to a template
Templates can include text, images, field references, and other Quickbase elements like reports. The following sections provide more details about options for getting started and elements that can be added.
Get started
There are different ways to start building document templates including:
- Enter text, field references, and other elements directly into the editor.
- Use the Import from Word option to start with existing Word documents. If the document includes field markers, you will need to re-insert them using the template builder. You may need to adjust some of the document formatting after the import.
- Work with HTML and CSS directly in source mode.
- Use HTML/CSS you've designed in a code editor or that is part of an existing template you have
- Copy the HTML output of an existing Exact Form and paste it into source mode. Do not try to copy the HTML from the Word template. If there are any field markers, re-insert them using the template builder after pasting into source mode.
Available elements
Use elements to pull parts of your app directly into the documents users generate. Available elements include:
- Report as a customizable table—Include reports from any related table. Quickbase inserts them as simple customizable tables so you can add formatting or rearrange content. Reports as customizable tables can contain up to 1000 records in generated documents.
- Report element—Includes reports from the same table. Works like the report element in custom emails.
- Form element—Works like the form element in custom emails.
- Repeat element—Works like the repeat element in custom emails.
- Table fields—Pull field values in the table directly into the generated document.
- Pre-built markers—Include information like app name, realm name, and table ID.
Quickbase elements with lots of formatting, like forms and reports, will look best in PDFs. Word does not support the styling necessary for these elements. We suggest generating Word documents for use cases with simple styling, like contracts.
Format your content
The template editor supports many formatting options, including:
- Font options
- Text formatting, like bold, italic, subscript, superscript
- Page breaks
- Image upload
- Tables
Use the template builder to format document appearance. Other settings like file type, margins, page size, and orientation, are determined by the formula that generates the document. Learn more in Generate documents from records in your app.
Supported HTML and CSS in source mode
Customize your document even more with HTML and CSS. Use any HTML and CSS tags that are broadly supported throughout Quickbase. Learn more in What HTML Tags are Allowed by Quickbase?
Additionally, Quickbase supports general CSS elements like:
style
class
title
alt
src
disabled
Most styling options related to the following things are also supported:
- Tables
- Including
td
andth
- Including
- Border
- Color
- Font
- Page breaks
HTML does not always perfectly translate to Word and PDF documents, so there may be some variations in what the template builder shows and how a generated document looks.
Font options
The editor offers basic font options. However, you can customize fonts more using source mode. Fonts are often different between software programs, browsers, and operating systems. For example, Microsoft Word, Chrome, and a Mac computer might all use slightly different fonts. This means that there may be slight variations between what you see in the template builder and the documents users generate.
Most of the font options provided in the editor are consistent between browsers and operating systems. Using them is the most sure way to avoid font variations in generated documents.
The fonts available in the editor that are consistent between browsers and operating systems are:
- Arial
- Courier New
- Georgia
- Times New Roman
- Trebuchet MS
- Verdana
Additional fonts that are consistent between browsers and operating systems are supported in source mode. They include:
- Andale Mono
- Arial Black
- Comic Sans MS (Bold)
- Impact
- Webdings
Add a header and footer
To add a header and footer to your document, add content to the respective Header and Footer sections of the template builder.
Determine page setup
In the Page setup section of the template builder, set:
- Page size
- Orientation
- Margins