Link Search Menu Expand Document

Fill in the Blank Questions

Fill in the blank questions are a little more complicated because you have to include the correct answers in the body of the question instead of the font matter. But, this does allow you more freedom when building the question.

---
type: FIB
---

My favorite color is ___(green)[]

Bob's favorite color is ___(Purple)[case sensitive: true, width 150px]

Pick your favorite color ___{Blue|+:Green|Yellow|Red}[]

There are two types of blanks you can use; a free entry field and a drop down with terms to select.

Blank Fields

For a free text entry field you’ll used the format ___()[]. That’s 3 underscores followed by a matched set of parenthesis and then a matched set of square brackets. The format is important because it’s how the script knows what to replace with a text field.

Inside the parenthesis is the correct answer. In the first two examples above green and Purple are the correct answers.

In the brackets you can add additional options, separated by commas. See the second example. It’s a case sensitive match and the field will be 150 pixels wide.

Option Notes
Case Sensitive If true then the matching will be done in a case sensitive manner. For the second example above, Purple is correct but purple would not be considered correct. For the first example, it is not case sensitive so green, Green, gReEn, etc. would all be considered correct.
contains If true then the answer must be contained in the answer. For the first example above, if the answer must contain the word green. If false, or not used it has to be an exact match.
regex If true the entered value will be compared using the value inside the parenthesis as a regular expression. For example, you could put /^\d{3}$/ in the parenthesis and it would require the user to enter a 3 digit number.
width Width of the text field. Can be any unit that CSS understands - px, em, vw, etc. If you don’t use this option the field is set to a default width.

The third example above is a drop down selection instead of a free text entry. Notice the {} instead of () surrounding the options. The format is ___{}[]. 3 underscores, a matched set of curly braces, and a matched set of square brackets.

Inside the braces you’ll put the options. In the example above there are 4 options in the drop down; Blue, Green, Yellow and Red. Each value is separated by a pipe character |.

Note the +: in front of Green. That is used to mark the correct answer.

Like blank fields, you can customize the dropdown using properties inside the [], although there’s currently only one option for dropdowns.

Option Notes
shuffle If true then the options will be shuffled. If false or not used, the options will be in the order they are listed.