Add a drop-down list

1. Create a listbox

Imagine you want to give your reader the possibility to choose the hair color for a character. Instead of adding four or more links at the end of the passage to pick from, you simply can create a drop-down list in the middle of the passage.

This is how it works:

  1. Create a listbox and add options to choose from.

  2. This is how it looks:

    <<listbox "$hairColor" autoselect>>
    <<option "black">>
    <<option "brown">>
    <<option "blonde">>
    <<option "red">>
    <</listbox>>

  3. Now, the reader can choose the hair color from a drop-down list, and the option they pick will be stored in the variable. You can simply write the variable name to use it.

2. Watch how it’s done

3. Start writing yourself

  1. Open a passage.
  2. Create the variable with a listbox.
  3. Add different options for your listbox. You can use the variable name later in the text to show the reader the option they picked.

Copy the following instructions and paste them into your passage, to start writing.

<<listbox "$myList" autoselect>>
  <<option "Option 1">>
  <<option "Option 2">>
  <<option "Option 3">>
<</listbox>> 

4. Be aware of this

Each option must be put in double-quotes.
The variable name in the listbox must be put in double-quotes.