Working with Wikis

Write wiki documents and templates: the editor, headers and footers, page breaks, variables, logic and AI blocks, page defaults, version history and the audit trail.

Help Centre › Forms & Data

A wiki is a document kept in your Library. Use it for internal guides, letters, contracts and other documents, and as the template a form fills in to make a PDF.

Creating a new wiki

  1. Go to Library › Wikis and add a new wiki.
  2. Fill in the Name, and optionally a Description and the Content.
  3. Click Create.

Find a wiki again under Library › Wikis or with the search bar at the top of the page.

Editing a wiki

A wiki has two tabs:

  • Preview shows the document as people read it.
  • Build opens the editor. Make your changes and click Save.

In Build, the Advanced button shows clean-up switches that run when you save: remove all comments, remove all class attributes, remove all style attributes, and remove excess tags. Use them after pasting from Word, Google Docs or a website.

The editor toolbar

The editor toolbar includes the following buttons and features:

ButtonDescription
StyleApply heading (H2–H6), paragraph, or blockquote styles
BoldMakes text bold
ItalicApplies italic emphasis
UnderlineUnderlines text
StrikethroughMarks removed or superseded text
Superscript / SubscriptFor footnotes, chemical formulas, or mathematical notation
Remove Font StyleClears inline formatting from selected text
Font FamilyChanges the typeface
Font SizeAdjusts text size
Text ColourChanges the colour of the text
Background ColourHighlights text with a background colour
Ordered ListCreates a numbered list (1, 2, 3)
Bullet ListCreates an unordered bullet list
Line HeightAdjusts spacing between lines
Paragraph AlignmentAligns text left, centre, right, or justified
ImageUploads and inserts images or logos
VideoEmbeds instructional or reference videos
LinkAdds external or internal hyperlinks
Horizontal LineInserts a horizontal rule to separate sections
Page breakStarts a new page in the PDF
TableInserts a table for structured data
Wiki LinkInserts a link to another wiki (auto-selects matching names)
Library ObjectInserts forms, folders, files, or other library objects
Insert VariableOpens a popup to select a form and insert one of its variables (e.g. {full_name}) directly into the wiki at the cursor position
Undo / RedoReverts or reapplies recent changes
FullscreenExpands the editor to fill the screen
Code ViewSwitches to raw HTML editing mode
HelpOpens the editor help reference

Tip: Use fonts and colours sparingly to keep documents professional.


Headers and Footers

Use <header> and <footer> tags in Code View to define content that appears at the top or bottom of every page in a generated PDF.


Basic Usage

<header>This appears at the top of every page</header>
<footer>This appears at the bottom of every page</footer>

Page-Specific Headers and Footers

You can target specific pages by adding a type attribute. This works identically for both <header> and <footer> tags.

TypeTag ExampleDescription
Default<header></header> or <header type="default"></header>Appears on all pages as a fallback when no more specific type matches.
First page<header type="first"></header>Appears on the first page only.
Even pages<header type="even"></header>Appears on even-numbered pages only (2, 4, 6, etc.).
Specific page<header type="3"></header>Appears on that exact page number only (e.g. page 3).
Page onwards<header type="2+"></header>Appears from the specified page onwards (e.g. page 2 and all subsequent pages).

Page Numbers

You can insert dynamic page numbers into headers and footers using the # placeholder. The first # is replaced with the current page number, and the second # is replaced with the total number of pages.

Examples:

<footer>Page # of #</footer>

This renders as: Page 1 of 5, Page 2 of 5, etc.

<footer># / #</footer>

This renders as: 1 / 5, 2 / 5, etc.

You can also use only the current page number:

<footer>- # -</footer>

This renders as: - 1 -, - 2 -, etc.


Priority and Precedence

When multiple typed headers or footers are defined, the system resolves which one to use for each page in the following order (highest priority first):

  1. Exact page number (e.g. type="3") – matches only that specific page.
  2. First page (type="first") – matches page 1 only.
  3. Page range (e.g. type="3+") – matches the specified page and all pages after. If multiple ranges match, the highest starting page wins (e.g. type="3+" takes priority over type="2+" on page 4).
  4. Even pages (type="even") – matches even-numbered pages (2, 4, 6, etc.).
  5. Default (type="default" or no type) – used as a fallback when no other type matches.

Combined Example

<header type="first"><img src="logo.png"> Company Name</header>
<header type="2+">Company Name - Continued</header>
<footer type="first">Confidential Document</footer>
<footer type="2+">Confidential - Page # of #</footer>

In this example:

  • Page 1 displays the company logo in the header and "Confidential Document" in the footer.
  • Pages 2 onwards display a simpler header and a footer with page numbers.

You can combine multiple typed headers and footers in a single wiki. The system extracts and applies each one to the matching pages in the PDF. Headers and footers support full HTML, including images, styling, and variables.


Page breaks

Click Insert a page break on the toolbar where the next page should start. In Code View it shows as <hr class="pagebreak">. The clean-up switches keep it.


Using Variables ({variable})

Variables allow your wiki to receive data from a Form.

Tip: Use the Insert Variable button in the WYSIWYG toolbar to pick variables directly from a form, ensuring the names match exactly.

Example wiki:

I, {full_name}, residing at {address}, declare this to be my Last Will and Testament.

When a form is submitted, these become:

I, Sarah Jacobs, residing at 12 Oak Street, Cape Town, declare this to be my Last Will and Testament.

Variables must match the form field names exactly.


Wiki Logic (Conditions, Loops, Formulas)

Variables fill in words. Logic changes the document itself – clauses that appear only when they apply, sections repeated once per beneficiary, values worked out before rendering.

ToolUse it toRead
{IF:…} {UNLESS:…}Include a clause only when it appliesShow or Hide Parts of a Document
{EACH:…}Repeat a passage once per row of a listRepeating a Section for Every Row
Calculated fieldsWork out an answer the form did not ask forCalculated Fields in Wikis
{#clause} {@name}Number clauses and refer to themNumbering Clauses and Cross-Referencing Them

For an overview of how these fit together, start with Wiki Logic: Making a Document Change Itself.


Using AI blocks ({AI:…}{/AI})

Use logic first. Where a rule has a definite answer ("if there are no children, leave out this section"), use a condition. Logic gives the same document from the same answers every time, costs nothing to run, and you can check it in Preview. Use AI only for wording, tone and summaries.

An AI block has an instruction and a closing tag. Put the text the AI should work on between them:

{AI: Rewrite this paragraph in plain English, keeping its legal meaning.}
The testator hereby nominates, constitutes and appoints ...
{/AI}

A block with nothing between the tags asks the AI to write the text there:

{AI: Write a two-sentence summary of the incident from the details given.}{/AI}

AI blocks only run when the form that fills the wiki has Use Artificial Intelligence switched on and an AI Prompt, and your company has AI set up. The form's answers are filled in first, then the AI works through the blocks, then the PDF is made.

Logic instead of AI

You want toUse
Say "he" or "she"{IF:gender="Male"}he{ELSE}she{/IF}
Word the clause for one or several beneficiaries{IF:COUNT(beneficiaries)=1}…{ELSE}…{/IF}
Write a line per beneficiary{EACH:beneficiaries}…{/EACH}
Add a guardian clause only for minor childrenA calculated field that counts children under 18, then {IF:minor_count>0}…{/IF}
Leave out a section when there are no children{UNLESS:has_children}…{/UNLESS}

Never let AI decide how an estate is divided. Worked examples are in Wiki logic.


Wiki defaults, history and other actions

These are in the wiki's menu:

ActionWhat it does
Wiki defaultsThe page and text settings for this wiki's PDF: body font, font size, line height and colour, the indent for numbered clauses, page size and orientation, and margins. Reset to defaults goes back to your company's settings.
Version historyA version is saved every time you save. Compare two versions, or restore an older one.
Audit trailWho created, changed, restored or deleted the wiki, and when.
CopyMakes a separate copy of the wiki.
DisableSwitches it off but keeps it.
LockStops other people changing it.
Move to trashDeletes it. It stays in Trash for 30 days.

Best Practices


1. Keep Formatting Simple

Avoid too many fonts, colours, or decorations.


2. Prefer Headings Over Bold Text

Improves structure and readability.


3. Don’t Overuse AI

Use logic for rules, and AI only for wording.


4. Use Meaningful Variable Names

Bad: {n1}

Good: {primary_beneficiary_name}


5. Wrap AI Blocks Tightly Around the Text They Change


6. Use Tables for Structured Data


7. Use Horizontal Lines to Separate Major Sections


8. Test Your Wiki with Sample Forms

Make sure logic works as expected.


Troubleshooting


My Wiki Won’t Save

Try:

  • Removing invalid HTML in Code View
  • Using the clean-up switches under Advanced
  • Checking for unclosed tags

Variables Are Not Being Replaced

Check:

  • The variable name matches the form field
  • No extra spaces: { full_name } (incorrect)
  • Correct curly braces: {full_name} (correct)

AI Didn’t Apply Instructions

Possible reasons:

  • The form does not have Use Artificial Intelligence on, or has no AI Prompt
  • The block has no closing {/AI}
  • A stray { or } inside the instruction
  • The instruction is too vague

The PDF Output Looks Wrong

Try:

  • Reducing complex formatting
  • Removing nested tables
  • Using simpler headings
  • Avoiding pasted Word formatting (use the clean-up switches)

Headers or Footers Not Appearing

Check:

  • Tags are correctly formatted: <header>...</header>
  • Tags are entered in Code View (not the visual editor)
  • The type attribute value matches the target pages
  • Page number placeholders use # (not curly braces)

Working With Forms

To learn how to integrate wikis with forms, read: Working with Forms.

Here you will learn:

  • How to attach a wiki as a template
  • How variables connect to form fields
  • How AI blocks run
  • How the final PDF is generated

Get started

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or have your first automation working in 7 days.