Working with Wikis

This article describes how to work with Wikis.

Help CentreForms & Data

Working with Wikis

Wikis allow you to create reusable templates, documentation, knowledge articles, and dynamic AI-ready documents that integrate seamlessly with Forms.

This guide explains:

  • How to create and edit wikis
  • How to use the WYSIWYG editor
  • How to insert images, videos, tables and links
  • How to use variables like {name}
  • How to use headers and footers with page numbers
  • How to make the document decide what to say (conditions, loops, formulas)
  • How to insert AI logic ({AI: ...})
  • How wikis integrate with Forms
  • Best practices
  • Troubleshooting

Table of Contents

  1. What Are Wikis?
  2. Creating a New Wiki
  3. Accessing & Searching Wikis
  4. Editing Wikis
  5. WYSIWYG Editor Overview
  6. Headers and Footers
    • Page-specific headers and footers
    • Page numbers
    • Priority and precedence
  7. Page Breaks
  8. Using Variables ({variable})
  9. Wiki Logic (Conditions, Loops, Formulas)
  10. Using AI Instructions ({AI: ...})
  11. Advanced Cleanup Options
  12. Wiki Management
  13. Best Practices
  14. Troubleshooting
  15. Working With Forms

What Are Wikis?

Wikis are reusable documents stored in your Library.

You can use them for:

  • Internal documentation
  • Templates
  • Contracts
  • Legal documents
  • Reports
  • Letters
  • Dynamic templates used with Forms and AI

Every wiki lives in:

library/wikis/<uuid>

You can also find wikis using the global search bar at the top of the website.


Creating a New Wiki

  1. Go to Library → Wikis
  2. Click + Wiki
  3. A popup will appear asking for:
    • Name
    • Description
    • Content
  4. Click Create

Your new wiki will appear under Library/Wikis.


Accessing & Searching Wikis

You can:

  • Browse wikis under Library → Wikis
  • Search for them using the top search bar
  • Open them directly via URL: library/wikis/

Editing Wikis

To edit a wiki:

  1. Open the wiki
  2. Click Edit
  3. Choose Build from the dropdown
  4. The WYSIWYG editor opens
  5. Make your changes
  6. Click Save

You can also access:

  • Advanced options
  • Copy / Disable / Lock / Delete (via Edit dropdown)

WYSIWYG Editor Overview

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

Insert a page break using the following HTML comment in Code View:

<!-- break -->

This forces the content after the comment to start on a new page in the generated PDF.


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 Instructions ({AI: ...})

AI instructions allow you to include logic and transformation rules inside the wiki.

Important: Use AI for wording, tone and summarising – the things that need judgement. Where the rule has a definite answer ("if there are no children, remove this section"), use a condition instead. Logic produces the same document from the same answers every time, costs nothing to run, and you can prove what it did in Preview. Several of the examples below are written as AI instructions to show the syntax, but would be better expressed as logic in a live template – each one notes the alternative.

When the user submits a form:

  1. Variables are inserted
  2. AI instructions are read
  3. AI modifies the wiki
  4. A final document (usually PDF) is generated

Placing AI Instructions

Multiple AI instructions can be placed anywhere in the document.

Example:

This is a section that may be removed.
{AI: If the user’s income is above 5000, remove this entire paragraph.}

Another example:

The beneficiary will be referred to as {beneficiary_pronoun}.
{AI: Replace {beneficiary_pronoun} with "her" or "him" based on the form field gender.}

AI Examples for South African Wills


Pronoun Handling

{AI: Based on the gender provided (male/female), rewrite all references to the testator using he/him or she/her appropriately.}

Better as logic: two fixed options is a condition, not a judgement call – {IF:gender="Male"}he{ELSE}she{/IF}.


Single Beneficiary

{AI: If there is only one beneficiary, rewrite the distribution clause so that all assets transfer entirely to that person. Remove references to multiple beneficiaries.}

Better as logic: {IF:COUNT(beneficiaries)=1}…{ELSE}…{/IF} – write both clauses yourself and let the count choose.


Multiple Beneficiaries

{AI: If multiple beneficiaries are listed, rewrite the distribution section to split the estate equally unless the form specifies custom percentages.}

Better as logic: loop the beneficiaries with {EACH:beneficiaries} and choose the wording from a calculated field that checks whether percentages were given. Never let an AI decide how an estate divides.


Guardian Appointment

{AI: If the testator has children under 18, generate a guardian appointment clause using the guardian details provided in the form.}

Better as logic: a per-row calculated field AGE({.id_or_dob}) < 18, then {IF:minor_count>0} around a clause you drafted. Worked through in full in Wiki Logic.


No Children

{AI: If the user indicates they have no children, remove the entire section labelled ‘Minor Children and Guardianship’.}

Better as logic: {UNLESS:has_children} around the section. A condition cannot mistake which section you meant.


Advanced Cleanup Options

When saving a wiki, you may click Advanced and apply cleanup toggles:


1. Remove All Comments

Removes HTML comments.

Before:

<p>Hello</p>
<!-- NOTE: this must be removed -->

After:

<p>Hello</p>

2. Remove All Class Attributes

Strips all CSS classes.

Before:

<p class="text-red big">Hello</p>

After:

<p>Hello</p>

3. Remove All Style Attributes

Removes inline CSS.

Before:

<p style="color:red; margin-left:30px;">Hello</p>

After:

<p>Hello</p>

4. Remove Excess Tags

Removes redundant or empty tags.

Before:

<p><span><span>Hello</span></span></p>

After:

<p>Hello</p>

Use cleanup when copy-pasting from:

  • Word
  • Google Docs
  • Websites

Wiki Management

Accessible via the Edit dropdown:

ActionDescription
CopyDuplicates the wiki, including content.
DisablePrevents use but keeps it in the system.
LockPrevents edits by other users.
DeletePermanently removes the wiki.

Note: Locked or disabled wikis cannot be used in Forms.


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 AI instructions only where logic is needed.


4. Use Meaningful Variable Names

Bad: {n1}

Good: {primary_beneficiary_name}


5. Place AI Instructions Close to the Content They Modify


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 Advanced Cleanup
  • 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:

  • AI instruction syntax incorrect
  • Form field missing
  • Logic contradicts itself
  • Instruction too vague

The PDF Output Looks Wrong

Try:

  • Reducing complex formatting
  • Removing nested tables
  • Using simpler headings
  • Avoiding pasted Word formatting (use cleanup)

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 instructions execute
  • How the final PDF is generated

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.