Skip to content

Logic, rules and calculations

A form adapts to its respondent. Logic decides which page comes next. The When it shows section of a A piece of a page that you add, move and set up: in a Studio form, a question, a text, a picture or a section; in a Docs template, a heading, a paragraph, a table or a picture.Glossary → decides whether it shows, is required or is read only. Checks on the answer refuse an answer that cannot be right. Calculations compute values from the answers (an age, a price) and read A value written in the address of a Studio form, such as the agent who shared it, known without asking the respondent.Glossary → of the form. All of them use A level of a product, such as "Third party" or "Comprehensive": the covers it includes, with their values.Glossary →, in the same language as Rate.

Changing the logic, rules, checks and calculations needs Studio: forms: Full.

  1. Open Logic. The Map of the pages shows every page and the ways between them, each page headed by its kind in its colour. Pages, at the side, lists them in order with their kind and the legend of kinds; click one to bring it into view.
  2. Click a page (or focus it and press Enter). Its panel names it, with its kind and Page 2 of 5, then After ”…” lists its conditions.
  3. Add a condition: under When, write a condition on the answers, such as driverAge < 18; under Then go to, choose the page.
  4. Under Otherwise, go to, choose the page that comes when no condition holds.

Conditions are tried from the first to the last; the first that holds decides. Try it earlier and Try it later change their order. A page cannot Someone who showed interest and has not been qualified yet: from a link, a form left half-way, a file, a referral.Glossary → back to a page before it, so a respondent never goes round in circles. Lead to an The last page of a Studio form, shown once the answers are sent, such as a thank-you message.Glossary → to stop the form with a message, for example when the driver is under 18: the answers are sent when a respondent reaches an ending page. Then go to and Otherwise, go to also offer Send the answers, which sends them from that page.

The map works like every editor of the suite: drag the empty map to move it, Ctrl and the wheel to zoom, and 0 or Show every page to see all of it. Drag a page to see its lines better; the map is laid out again the next time it opens. Each condition leaves its page from its own exit, numbered as in the panel, and the way otherwise from the last one, so no line runs over another. A line reads its condition with the names of the questions, like 1. [Age of the driver] < 18. Send the answers shows on the map once a page leads there.

The header is that of Build, with Undo, Redo and Find a page or a condition in sight, then Checks, History, Comments, Preview and Publish; More holds Show every page and Keyboard shortcuts.

Find a page or a condition (Ctrl+F, also in the menu of the empty map) finds a page by its title and a condition by its formula: choosing one shows it on the map and in the panel, and the keyboard stays in the field.

Right-click a page for Open in the panel and Add a condition. Right-click a line for Open in the panel (at its condition), Try it earlier, Try it later and Delete condition 1; or select a line and press Delete. A deleted condition is said in a message with Undo. See Working in an editor, and the keys and menus of the map.

Something can be allowed and still worth saying: a chip number left empty, an attestation not ticked. In the panel of a page, under Before going on:

  1. Add a question before going on.
  2. Under Ask it when, write the condition, such as isNull(chipNumber).
  3. Write its Title and its Text: what the respondent should know. The text takes bold, italic, lists and links, for example to a sample letter, and can write an answer in with {{ petName }}.
  4. If you want, rename Button that stays (empty: “Back”) and Button that goes on (empty: “Continue”).

When the respondent presses Next and the answers of the page are right, each question whose condition holds opens in turn, in the order of the list (Ask it earlier, Ask it later). Back stays on the page to change an answer; continuing every question goes on with the answers as they are. In the responses, Continued before going on lists the ones the respondent continued: the server works them out from the answers. A question whose condition reads no answer and never holds is reported in Checks. Its texts are translated with the others of the form in Languages.

In a block’s settings, When it shows:

  • Show only when: a condition such as hasClaims or driverAge < 25. While it is false the block is hidden, and its answer is neither used nor sent.
  • Required only when: the answer is required only in some cases.
  • Read only when: the respondent sees the answer but cannot change it.
  • Answer set by a rule: Add a case, then When a condition holds, The answer is a value or a formula.

The type of a question is always checked (an email, a date). In Checks on the answer, Add a check adds more:

CheckWhat it accepts
LengthAt least or at most a number of characters.
Between two valuesA smallest and a largest value.
FormatA common format (Digits only, French postal code, 5 digits, French number plate, like AB-123-CD, SIREN number, 9 digits, SIRET number, 14 digits, IBAN, without spaces), or Another format, with a pattern. The French formats are offered when your Your company as the suite knows it: its people, its records and its settings. Everything you see belongs to one organization, and nobody from another organization sees it.Glossary → works in France.
Date windowCounted from today: born at least 18 years ago, within the next 30 days.
Days of the weekOnly Monday to Friday, or only Saturday and Sunday.
ConditionAny yes or no condition on the answers, like licenceDate > birthDate.
Check with another systemAsks one of your systems through a Another system the suite calls for you, such as a lookup service or a tool of your own, with its address and its access, set once in the console.Glossary → (see Connections and Rate in forms).

Each check has a Message when it fails (leave it empty for a clear default) and Only when, to check only in some cases. The server checks the answers again when the form is sent.

  1. Open Calculations, then Add a calculation: it comes into view at the end of the list, its Name ready to type.
  2. Give it a Name your A part of your organization or of your network, such as an agency, a distributor or a sales team. Teams can sit under one another, and a person belongs to one.Glossary → reads, and a Name in formulas.
  3. Write its Formula, for example age(birthDate). The editor suggests names and functions as you type and shows problems at once.
  4. Choose what it Gives (Number, Amount, Text, Yes or no, Date) and, for a number or an amount, its Rounding and Rounded to (decimals). An Amount is a number in a Currency: it starts in the currency of the form (the one of its first amount, What your organization subscribes to: the apps and options it may use, and limits such as the number of users or the storage.Glossary →, payment or price question, else euros) with two decimals, and shows with its currency everywhere, in the language of the form: €505.00 in English, 505,00 € in French, ٥٠٥٫٠٠ € in Arabic. That is so in the texts of the live form ({{ basePremium }}), the emails of automations, Preview, the responses, their printout, the exports and the data Docs reads. A calculation made before keeps showing as a number until you make it an amount.
  5. Turn on Keep the value with each response to store and export it with the answers, as it was when the form was sent.

Each calculation shows its kind and how many places use it (Used in 3 places: click it to see them and go to one, highlighted), or Not used yet; each value from the link the same. Delete the calculation removes it at once and says so in a message with Undo, as a value from the link. A calculation is updated as the respondent answers. Use it in conditions, texts and plan prices like an answer; in a text, write its name between double braces, like {{ driverAge }}.

Once a text of the form shows a calculation, its card also asks What the text shows while this value is empty (in a form file or through the API, whenEmpty), translated with the form on Languages. Leave it empty to show nothing. For example, a label such as Is {{ petName }} neutered? then reads “Is your pet neutered?” before the name is typed, and “Is “Rex” neutered?” after.

Add a value from the link reads a value from the address of the form, without asking: add ?agent=42 to the link, and the form knows the agent who sent it. Give it a Name and the Parameter in the link (the part before =). Useful for partners, campaigns and pre-filled forms. Preview lets you set these values.

In the formula editor, the answers, calculations and values from the link show by the names people read, as chips in the colour of their kind, and the suggestions open as soon as you type a letter (or with Ctrl+Space in an empty field): they find a name by its The short name of an answer or a calculation in Studio, used in formulas and exports, such as birthDate.Glossary →, like prenom, or by any part of the names people read, in every language the form is written in, best match first, each with the dot and word of its kind. Each function in the list says what it does, with its arguments and an example; inside a function’s brackets, a line above the cursor shows its arguments, the one you are typing in bold. An empty field shows an example made with the form’s own names, like prenom == "Anna". Comparing a question with a text, a number or one of its choices is checked as you type; comparing a number with a text says so in words, like “Cannot compare a number with a text.” Write answers and calculations by their name, numbers as 12.5, texts between A priced proposal made to a client, valid until a date.Glossary →, and combine them: driverAge >= 18 and not hasClaims, if(vehicleValue > 30000, 1.2, 1), usage == "pro". The language is the one of Rate: see Formulas and the Functions reference. In an automation, responseNumber and formName can also be used.

  • This needs a yes or no condition, like age >= 18: a condition gives a number or a text; compare it with something.
  • Another block, page or calculation already has this name: choose another Name in formulas.
  • This value uses itself in a loop: a calculation uses itself, directly or through other values; the message, under each formula of the loop, names them by their labels. Change one of these formulas.
  • A formula reports a problem after a block was deleted: change the formulas that used its answer, or undo.
  • The problems button of the header shows every problem with where it is; red ones block publishing. A click on a problem of a calculation opens its formula. The messages are on the Messages reference page.