@TEXT_QUESTION
Specifies that a variable expects to receive text and customize how to ask for the value.
Before generating a document, DocuMold will display a text box to write a short single line of text.
Usage
Parameters
variable |
(Required) The variable this applies to. Do not use double quotes ( |
example_value: |
(Named) The initial value in the form when preparing a template (via “Prepare a template”). If not given, the value of |
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”). This is also the default value of the |
label: |
(Named) The text to display beside the text box that asks for the value. Defaults to variable’s name. |
optional: |
(Named) Set this to |
placeholder: |
(Named) When the text box is empty, this will be displayed in gray as an example or short message |
trim_with: |
(Named) The function used to remove extra spaces in the entered value. Default is “TRIM”, but can also be: “TRIMLEFT”, “TRIMRIGHT” or “TRIMSIDES”. Use “NOTHING” to no remove extra spaces. |
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
More information
Cleaning the entered value
@TEXT_QUESTION
, just like @BIG_TEXT_QUESTION
, cleans the entered value. This is to reduce
problems caused by accidentally placing a space before or after the value, or accidentally using more than one space.
The cleanup is done by running the TRIM
function on the entered value.
This means that if the user enters " Anna Logwatch "
(without the quotes), the value in the variable will be "Anna Logwatch"
.
This can be changed using the trim_with:
parameter. Either by changing what is removed (using values "TRIMLEFT"
, "TRIMRIGHT"
or
"TRIMSIDES"
which are function names) or disabling the feature with "NOTHING"
or NOTHING
.
Other
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.