Question options

When you select a question and click on the button in the toolbar, you will see a popup with the most common options for the question.

Datafield

One of the most central options is the datafield that is assigned to the question.

Which datafields are shown in the dropdown list, depends on the type of question and (for text questions) the number of answers.

Answer options

One / multiple answers

Unlike all the other types of questions, text questions can receive multiple answers:

  • a text question with only one answer corresponds to a “text” datafield
  • a text question with multiple answers corresponds to a “list of texts” datafield

Different answer per language

For each type of question, you can indicate that different answers should be possible per language. For example, while the name of a company will (usually) be the same across languages, the same will probably not hold true for the name of a city or the name of a product. In the latter situation, you will want to enable the different answer per language option, to allow the end-user to fill in different answers for each of the languages.

Answer is not mandatory

You can make a question mandatory by un-checking the answer is not mandatory option (which defaults to true).

Tip: when you hold down Shift when adding a question or card, the question will be immediately set to mandatory (instead of the default non-mandatory).

This will effectively cause a red dot to be shown next to the title of the question:

When at least one mandatory question is not filled in, ClauseBase will show a warning message to the end-user at the top of the right-side document:

Note that, even when mandatory questions are unanswered, users can still save answers and/or export the document.
The red dots can be collectively disabled through the Q&A options.

Help text

To guide end-users when completing a questionnaire, you can provide a subtle help text. This text will deliberately not be shown permanently: the end-user must hover above the question-mark icon in order to see the help text.

Instead of using a help text, you can also insert a comment or warning (which are separate types of “questions”). Unlike the help texts, comments and warnings can be subjected to conditions on when they should be shown — but if these conditions are met, they will be constantly visible on the screen.

If you want to give an even more subtle cue to the end-user, you may envisage using placeholder text in a text question (see below).

If the help text is merely intended to warn the user about the unit of measurement (i.e., that the answer should be assumed to be a percentage, or provide a certain number of centimeters), you may instead want to use the suffix option described below.

Layout options

ClauseBase allows you to fine-tune the look-and-feel of each question, through numerous options, available when you click the button.

Placeholder

Text questions can optionally receive a placeholder, i.e. a text in a subtle grey color that will be shown inside the text box to guide the user’s answer. As soon as the end-user starts typing an answer, the placeholder text will disappear (and will not re-appear until all text would be deleted)

Answer area

Text questions can optionally be shown in a large answer box.

Unlike the regular box, such large answer box will allow end-users to insert newlines in the text. However, you will have to wrap the datafield in the special function @to-paragraphs if you want those newlines to also appear in your document’s text.

Hide title

Any question’s title can be made to disappear. A typical scenario in which you would like the title to disappear, is in a card with a single question, because the card’s title and the question’s title will then tend to overlap.

Title color

In addition to setting a card’s border and title color, you can also set a card’s title color. When used sparingly, this may for example help in alerting attention to some questions.

In addition, this can also be useful to change the color of an entire comment or warning:

Show unavailable predefines

When enabled, this option will show all predefines of the question, even those that do not meet the conditions attached to them.

This can be useful if you want to show the end-user an exhaustive list of options, even when some of those options happen to be currently unavailable for some reason.

Indent

Within a card, you can indent a question up to three levels. This can sometimes be useful to subdivide related questions.

Merge with previous / next

By default, ClauseBase will insert a grey horizontal divider line between each question. You can optionally remove this line by checking the “merge with previous” or “merge with next” checkboxes. (It is sufficient if either of those is set between two questions.)

Compare this screenshot (in which most divider lines are removed) with the screenshot above.

Suffix

For some questions — typically numerical questions involving units — it can be helpful to insert a suffix in the answer, to clarify how the end-user is expected to answer the question.

Using such suffix, you can avoid a help text or comment such as “assumed to be a percentage” or “please provide in centimeters”.

Validation

Text questions can optionally be validated. Invalid answers will then be rejected until corrected by the end-user.

Validations can be very useful in specific situations, but please do not go overboard with them, because can easily frustrate users.

Think, for example, about all those situations you have probably encountered online where your phone number was not accepted by some form — some websites insist on “+32476123456” while others will require “0032476123456” and yet others allow for “0476/12.34.56”.

If you merely want the phone number to be printed in a party’s contact details, you should probably avoid strict validations.

ClauseBase provides a list of pre-programmed validation structures — phone numbers, VAT numbers and national & international IBAN bank account numbers that you can choose from. In addition, you can specify a warning message in each of the languages, that will be shown every time the user enters an incorrect value.

In addition to the predefined validations, you can also easily define your own validations — either from scratch, or by starting from an existing validation structure. These validations are written in a standard mini programming language called “regular expressions” (sometimes abbreviated as regex) that defines what a piece of text should look like.

For example, in the screenshot below, the weird stuff at the right should be interpreted as follows:

  • (+|00) start with either a “+” or the numbers “00”
  • [1-9] next should be a single digit between 1 and 9 (i.e., not a zero)
  • [0-9 -().] next comes either a number, or a hyphen, or one of the parentheses, or a dot
  • {7,} there should be at least 7 repetitions of the character defined in the previous bullet

There are many websites online that allow you to learn about, and interactively experiment with, these regular expressions. A good example is http://www.regex101.com/ (the regex “dialect” used by ClauseBase is the JavaScript Regex). Many introduction tutorials exist — see, for example, https://regexone.com/.

If you need even more advanced validation options, or if you want to apply validations to other types of questions, you can program custom functions. Please be aware, however, that this involves a separate programming language.

Productivity tips for setting question options

  • You can click the button to “attach” those options to the question, so the options will be more readily visible on the screen.
  • When a question is selected, you can also press Ctrl-Shift-O to either attach the options to the question and show them on the screen (or to hide the options if they were previously visible).

Was this article helpful?
Dislike
Adding conditions to cards, questions and change sets
How to: allow users to select legal entities & addresses