HowTo: dropdowns, checkboxes and radio buttons

Here we will concentrate on how to display certain variables that are expected to have just a limited set of available values as:

  • Dropdowns
  • Multiselects
  • Checkboxes
  • Radio buttons

Dropdowns

Imagine that we have a variable in our template that it is supposed to be filled with the correct treatment for an unknown user.

Although we could leave that variable as a simple text variable and expect the user to fill the corresponding value like Mr. or Mrs. it would be much better if the end user will be offered a dropdown menu with just those two possibilities.

To do so is quite straightforward:

First click on the editing interface into the relevant variable:

howtodropdowns1

As usual the editing interface will open:

howtodropdowns2

Chose “options” as the chosen type and “Dropdown menu”.

Then you should insert the list of possible values separated by ‘;’.

After doing so the end user interface will show as follows:

howtodropdowns3

Multiple selection

This case is in all analogous to the previous dropdown case with the only difference that more than one value may be chosen.

Although in the previous we would have chosen the multiple selection option (although in this particular case this would have been an awkward choice):

howtodropdowns4

The end user interface will show:

howtodropdowns5

Checkboxes and radio buttons

The procedure for checkboxes and radio buttons is very similar although in these cases one should include the variable as many times as needed (one per checkbox or radio).

For example this template:

howtodropdowns6

The variable named “overall_opinion” appears five times so if we click on any of them in the template edition interface:

howtodropdowns7

We should chose “Radio buttons” (or checkboxes if we want more than one available option to be chosen) and list as before the possible values.

In this particular case the end user interface will show:

howtodropdowns8

Notice that the options are not shown in this interface (although they would be visible if we choose to display the document directly as a web form) and the accompanying text should be written explicitly in the template.

Other editing options

We will not repeat here all the possible editing options associated with a variable and we will refer to the case of the text type variables for a general description, but we would like to point out certain special properties that are of application in this case.

Default values

In this case there are two ways of assigning default values:

  1. Providing a value in the Value input box.
  2. Including a @ just before the chosen value. For example, Mr.;@Mrs. will set Mrs. As the default value in the end user interface.

Compulsory

  • Radio buttons are always compulsory, i.e. if no one is checked Docxpresso will assume it does not validate.
  • Checkboxes are not compulsory unless they are marked as such, in that case at least one should be checked.
  • Dropdowns and multiselects behave to that regard as standard text variables, i.e. only compulsory if checked to be so.