@NUMBER_QUESTION

Specifies that a variable expects to receive a number and customize how to ask for the value.

Before generating a document, DocuMold will display a box to put the number in.

Usage

<# @NUMBER_QUESTION(variable, **see parameters below**) #>

Parameters

variable

(Required) The variable this applies to. Do not use double quotes (") around it, just write it as a usage of the variable.

example_value:

(Named) The initial value in the form when preparing a template (via “Prepare a template”). Must be a number. If not given, the value of initial_value is used.

help_text:

(Named) Displays a clickable (?) bubble beside the label. Clicking it will reveal this text. Useful to give directions to the user of the DocuMold template.

initial_value:

(Named) The initial value in the form when using a template (via “Use a template”). Must be a number. This is also the default value of the example_value parameter.

label:

(Named) The text to display beside the number box that asks for the value. Defaults to variable’s name.

placeholder:

(Named) When the text box is empty, this will be displayed in gray as an example or short message

optional:

(Named) Set this to TRUE to allow the user to leave the number empty (value would then be NOTHING)

Parameters with “Named” mean that you must specify the name of the parameter and a colon before its value. Ex: example_value: "its value"

Examples

Example Result

<# @NUMBER_QUESTION(age, label: “Age of the participant”, placeholder: “Ex: 18”) #>

<# @NUMBER_QUESTION(price, label: “Price”, placeholder: “Ex: 9.99”) #>

More information

The value in the variable will be a number, not a text. So it is possible to use number-related operators and functions with this variable without needing to convert.

If no value is entered in the form for this question, the variable will be set to NOTHING.

This action does nothing to the document itself; it gets erased when generating a document.

All @..._QUESTION actions are normally placed at the end of the template to avoid overwhelming unfamiliar users.

The @IF action has no effect on the @...QUESTION actions. The @...QUESTION actions have an effect even when they is hidden.

See also