Skip to main content
Formulas work out numbers from the fields you fill in, so nobody reaches for a calculator. Conditions show a piece of text only when it applies. Both live in the panel on the left of the snippet editor: formulas under Math, Show or hide rules, conditions and greetings under Logic.

Price line

A Price line works out one line of a quote from a price. Click Build the line, then choose what to work out:
  • Type the percentage, or Use a saved one: a rate the snippet already has, such as DISCOUNT, so several lines share it.
  • Choose how many decimals the answer keeps: 0, 1 or 2.
  • The line reads a price box that’s already in the snippet. If there’s none, the window adds one at the cursor.
Only the answer is printed, with no working next to it.

Calculator

A Calculator works out a number from figures you fill in, and prints the working, like 100 - 25 - 5 = 70. Click Build the calculation and choose:
  • It takes 2 to 10 numbers. Each box is named in the form, like Add: first number. The name isn’t printed.
  • Dividing by 0, or a percent change from 0, prints no answer instead of a wrong one.

Interest

Interest has two buttons, Simple interest and Compound interest. Each adds its number boxes and prints the working with the answers:
  • Simple interest prints the interest, then the total with the principal.
  • Compound interest prints the final amount, then the interest earned.
  • Times a year starts on 12, which is monthly. Type 1 for yearly, 4 for quarterly or 365 for daily.
  • An empty, zero or negative box prints no answer instead of a wrong one.
  • Compound interest needs extension version 3.52.0 or later. An older one prints the working without the answer.

Change or remove a formula

The formula windows show how many formulas the snippet has. Manage lists them, each with Edit and Remove. Saved values, like {var: DISCOUNT = 1.5}, are in the list too, and every line that uses one follows when you change it. Edit opens the formula as steps, with no maths to type:
  • At the top, This line will print shows the answer, worked out with the snippet’s default numbers, or 100 and 10 where a box has none.
  • How it’s worked out lists the steps from top to bottom: Start with a value, then Add, Subtract, Multiply by, Divide by, Take off % or Add %. Each step picks a box or saved value from its menu, or A number I type. For a percentage, type the number: 1.5 means 1.5%.
  • Add a step puts a new step at the end. The bin beside a step removes it. Steps work on everything above them: “Subtract the saving, then Take off 10%” takes 10% off the price after the saving.
  • How should the number look? shows the answer with 2 decimals, 1 decimal and as a whole number. Click the one you want.
  • Type the formula yourself shows the formula as text, for anyone who prefers it. Changes there show in the steps.
  • Click Save, or Cancel to leave it as it was. New formula instead keeps it and goes back to adding a new one. After a save, Undo under the body takes it back.
A formula the steps can’t show, such as one using datespan, opens as a box with the formula in it instead: change it and click Save. If it can’t work, for example a bracket is never closed, the box says what to fix. An Interest formula has no Edit, because its answers only work together: remove it and add it again. Remove takes a formula out, and Undo under the list puts it back. Removing a saved value that another line still reads asks first: Remove anyway or Keep it.

Show or hide

A Show or hide rule prints a piece of text only when an answer calls for it, the way a form shows a question only when it applies. Click Build a rule under Logic and fill in the three steps: Under the steps the rule reads back as one sentence, like If PLAN is "annual", show "Two months free." Otherwise nothing, and the panel lists it the same way. The checks:
  • Capitals don’t matter: annual matches Annual.
  • A Number field compares as a number, so 1.200,50 is more than 1000. An empty Number counts as 0.
  • The answer you type reads the same way: 1.500 means fifteen hundred.
  • On a Choice field you pick the answer from its options. On a multiple choice, contains checks whether that option was ticked.
  • Date and time fields can’t be checked.

A text for each option

On a Single Choice field the window opens on has a text for each option. Step 2 lists the field’s options, each with its own box. Fill them in, for example on a PLAN field: Only the text of the option picked prints. An option left empty prints nothing. One rule covers every option, and it reads back as one sentence: If PLAN is "Basic", show "Email support on weekdays." Or if PLAN is "Pro", show "Phone and email support every day." Otherwise nothing. On a Choice field step 1 also shows Print the picked option:
  • On: the option picked prints where the field sits, as well as the rule’s text.
  • Off: the field only decides what prints. The form still asks, and the option stays out of the message.
A new has a text for each option rule starts with it off, since each text already says what was picked. Inserting or saving the rule changes the field too. The same switch is in the Choice window. Every rule in the snippet is listed at the top of the window, each with Edit and Remove, and under the Show or hide toggle in the panel. Click a rule there, or put the cursor inside one and click Edit this rule, to change it.
A rule can’t sit inside another condition. Put the cursor outside any {if: ...} before you insert one.
Contains needs extension version 3.62.0 or later. An older extension treats it as false. The other checks work on every version.Switching off Print the picked option needs extension version 3.70.0 or later. An older extension still prints the option picked, and offers print=no as one more option.

Conditions

Condition inserts {if:A > 0}text{endif}. Replace A > 0 with what has to be true and text with what prints when it is.
  • Numbers compare with >, <, >=, <=, == and !=.
  • Text compares with = or != against a value in quotes: PLAN = "annual". != "" means the field is filled, and contains finds a value anywhere in the answer: NOTE contains "urgent".
  • {elseif: ...} adds another case and {else} covers the rest. The first true branch prints, and the others don’t.
  • The first {endif} closes the block, so a condition can’t sit inside another one.
Every condition in the snippet is listed under Condition in the panel, with Edit and Remove. A rule built with Show or hide opens in its window. One typed by hand is changed in its row: edit what has to be true, then click Save.

Greeting

Greeting inserts {greeting}, which prints Good morning, Good afternoon, Good evening or Good night from the clock where the snippet expands. Morning starts at 5, afternoon at 12, evening at 18 and night at 22.
  • It follows the snippet’s language: English, Italian, Spanish or French. Force one with {greeting: lang=ES}.
  • Replace a wording with your own: {greeting: morning=Hi there}.
  • The greetings in the snippet are listed under Greeting in the panel. Edit changes the settings in the row, for example to greeting: lang=ES, and Remove takes it out.

Writing formulas by hand

Type {= and } around any calculation: {=PRICE * QTY}.
  • Use +, -, *, / and brackets, with the names of your number fields.
  • Functions: round(X, 2), avg(), min(), max(), abs(), floor(), ceil() and pow(X, N) (X to the power N).
  • Answers keep up to two decimals.
  • A field that doesn’t hold a number makes the formula print nothing, not a wrong total.

Days between two dates

  • datetimediff(DATE_1, DATE_2, "calendar") counts whole days between two date fields.
  • datespan(DATE_1, DATE_2, "inclusive") counts both ends. With "between" it counts the days in between. It prints nothing when a date is missing or the end comes first.

Dates that fill themselves in

{time: DD/MM/YYYY} prints today’s date. The Automatic button in the Fields group writes these for you. See Fields. Month and day names print in English. To write the whole date out in the snippet’s language, use long: {time: long} prints viernes 9 de octubre de 2026 in a Spanish snippet. Add shift= to move the date, like {time: DD/MM/YYYY; shift=+3D} or {time: DD/MM/YYYY; shift=next monday}, and at=09:00 to fix the time.

Upper and lower case

Wrap text in {case: upper} and {/case} to change its case after it expands. The other options are lower, title and sentence. Fields inside it are filled in first, then cased.