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
- What Are Wikis?
- Creating a New Wiki
- Accessing & Searching Wikis
- Editing Wikis
- WYSIWYG Editor Overview
- Headers and Footers
- Page-specific headers and footers
- Page numbers
- Priority and precedence
- Page Breaks
- Using Variables (
{variable}) - Wiki Logic (Conditions, Loops, Formulas)
- Using AI Instructions (
{AI: ...}) - Advanced Cleanup Options
- Wiki Management
- Best Practices
- Troubleshooting
- 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
- Go to Library → Wikis
- Click + Wiki
- A popup will appear asking for:
- Name
- Description
- Content
- 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:
- Open the wiki
- Click Edit
- Choose Build from the dropdown
- The WYSIWYG editor opens
- Make your changes
- 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:
| Button | Description |
|---|---|
| Style | Apply heading (H2–H6), paragraph, or blockquote styles |
| Bold | Makes text bold |
| Italic | Applies italic emphasis |
| Underline | Underlines text |
| Strikethrough | Marks removed or superseded text |
| Superscript / Subscript | For footnotes, chemical formulas, or mathematical notation |
| Remove Font Style | Clears inline formatting from selected text |
| Font Family | Changes the typeface |
| Font Size | Adjusts text size |
| Text Colour | Changes the colour of the text |
| Background Colour | Highlights text with a background colour |
| Ordered List | Creates a numbered list (1, 2, 3) |
| Bullet List | Creates an unordered bullet list |
| Line Height | Adjusts spacing between lines |
| Paragraph Alignment | Aligns text left, centre, right, or justified |
| Image | Uploads and inserts images or logos |
| Video | Embeds instructional or reference videos |
| Link | Adds external or internal hyperlinks |
| Horizontal Line | Inserts a horizontal rule to separate sections |
| Table | Inserts a table for structured data |
| Wiki Link | Inserts a link to another wiki (auto-selects matching names) |
| Library Object | Inserts forms, folders, files, or other library objects |
| Insert Variable | Opens 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 / Redo | Reverts or reapplies recent changes |
| Fullscreen | Expands the editor to fill the screen |
| Code View | Switches to raw HTML editing mode |
| Help | Opens 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.
| Type | Tag Example | Description |
|---|---|---|
| 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):
- Exact page number (e.g.
type="3") – matches only that specific page. - First page (
type="first") – matches page 1 only. - 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 overtype="2+"on page 4). - Even pages (
type="even") – matches even-numbered pages (2, 4, 6, etc.). - 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.
| Tool | Use it to | Read |
|---|---|---|
{IF:…} {UNLESS:…} | Include a clause only when it applies | Show or Hide Parts of a Document |
{EACH:…} | Repeat a passage once per row of a list | Repeating a Section for Every Row |
| Calculated fields | Work out an answer the form did not ask for | Calculated Fields in Wikis |
{#clause} {@name} | Number clauses and refer to them | Numbering 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:
- Variables are inserted
- AI instructions are read
- AI modifies the wiki
- 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:
| Action | Description |
|---|---|
| Copy | Duplicates the wiki, including content. |
| Disable | Prevents use but keeps it in the system. |
| Lock | Prevents edits by other users. |
| Delete | Permanently 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
typeattribute 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