Text Input, Numeric Input
Description
The text input and numeric input parts allows application users to enter responses/information. LogicNets uses the same part editor for both text and numeric values, and the options available are explained below.
Use
The text/numeric input part allows you to present a field where users can enter a single line of text as well as free text, numbers, or currency amounts into an application. The system writes the entered value in the application context.
Because of the underlying code, you should not use the following words in a data object name: and, break, do, else, elseif, end, false, for, function, if, in, local, nil, not, or, repeat, return, then, true, until, while.
Route on Output in Assessment Framework Applications
Use this feature to determine the user experience when answering questions. With route on output unchecked, any subsequent questions will appear on screen at the same time and the user can answer in any order. For a more structured step-by-step user experience, connect the _unanswered leg of a text or numeric input(with route on output enabled) to the STOP node (or an empty process node) to cause the UI to stop here until the question is answered. In version 8.1+, the same feature is available for radio lists, dropdowns, and checklists.
Editor Fields
Basic Tab Options
Field Name | Description/Use | Type/ Options |
Optional/ Mandatory |
HTML enabled | When this option is enabled the question caption can be formatted using HTML. | Yes | No | Optional |
Question | This is the caption that displays in front of the text input field. | Text | Optional |
Data Object | This is the name of the data object in which the user input will be stored. | Data Object | Mandatory |
Route on Output | If you select this field the system will follow the path to the next step based on the selection the user makes. (v8+) The default leg is renamed _unanswered to be consistent with the checklist implementation of this feature. |
Checkbox | Optional |
ToolTip | This is the text the system displays when a user hovers their mouse over the text input field. This can be used to provide additional information or guidance to the user when they are filling in the field. | Text | Optional |
Placeholder | This is information that displays in the input field before the user enters data. This can provide users a hint about what to enter in the field. | Text | Optional |
Input Mask (RegEx) | This field allows you to format your TEXT input field according to your requirements. The system enables the text field formatting requirements if you enter a JavaScript regular expression (regex) in this Input Mask (RegEx) field. If the field does not contain regex, then the text the input field is unformatted. This feature is only available with data object type = text. |
Text | Optional |
Hint | The contents of this field appear in subtext just below the input box, and is typically used to display additional information about the input on screen all the time. (For additional information that you want displayed only when the user needs, consider using the Help Content References (in Assessment Framework). | Text | Optional |
Default Value | This is the default value for the data object when it has not been set with a value. | Text | Optional |
Prefill Value | This is the value that will be filled in the control when no value has been set to the data object. Note: Prefill is different from default in the sense that the value will not be set to the data object, only shown on the control as a prefill. Hence the form must be submitted with this value before it is stored to the data object. | Text | Optional |
Weight | This is used in the special case of weighting inputs in an assessment, using the LogicNets Assessment Framework. | Number | Optional |
Mode | Defaults to Editable. Both of the other options show a non-editable field on screen but with the following differences:
|
Dropdown | Optional |
Data object type |
|
Text | Number | Mandatory |
Unit | Numeric Form Type Only. This field is visible for numeric input form types and it allows you to set the unit of measure to apply to the numeric field. For more information about setting unified code for units of measure, see this topic. | Text | Optional |
Submit on leave | In Assessment Framework applications, the text entered will be auto-submitted when the user leaves this input box to answer another question when this box is checked. | Checkbox | On | Off |
Input type | This is the type of input control rendered in the browser. See w3schools.com for more information on how input types work in HTML.
|
Text | Number | Password | Formatted Number | Formatted Text | Mandatory |
HTML enabled | If you check this checkbox, end-users can format the comment using HTML. | Yes | No | Optional |
Speech command | If speech recognition is enabled, this is the alternative caption the system will recognize to select or answer this field. | Text | Optional |
Numeric Input Type Options
Field Name | Description/Use | Type/Options | Optional/Mandatory |
Prefix | Text rendered typically before the input control. This can be used to print a currency symbol, for example. The field will also accept interpolated text, e.g. $(currency_symbol). Prefix can contain HTML elements in LogicNets Release 7.4 on by checking the HTML-enabled box. |
Text | Optional |
Postfix | Text rendered typically after the input control. This can be used to print the unit. The field will also accept interpolated text, e.g. $(currency_symbol). Postfix can contain HTML elements in LogicNets Release 7.4 on by checking the HTML-enabled box. |
Text | Optional |
Max chars | This is the maximum number of characters allowed in the field. The browser enforces this limit. | Number | Optional |
Trim spaces | This field allows you to remove the spaces from both ends of the input value. The default value is No. | Yes | No | Optional |
Allow show/hide password | In LogicNets version 7.4.2 and higher, if the input type field is set to password the system shows this checkbox . If this checkbox is checked, the system will allow the application user to show or hide the password characters as they enter them. | Checkbox | Optional |
Decimals | This field allows you to set the number of places after decimal.
|
Options | Number | Optional |
Round/Truncate | If the field is set to receive numbers, choosing Round allows you to define to how many places the system will round the value the user enters in the Decimals input that appears when this option is selected. Choosing Truncate directs the part to cut off any decimal places beyond the number specified in the Decimals input that appears when this option is selected. |
None | Round | Truncate | Optional |
Step size | Browsers can introduce up/down widgets associated with numeric inputs. This numeric parameter indicates the step value. E.g. a step size of 10 means the browser widget will increment through 10, 20, 30, etc. Note the user's input is NOT validated against this set of values - they can still edit the browser suggested value to any number of their choosing | Number | Optional |
Decimal | This field allows you to select which decimal character -- dot or comma -- is accepted and shown to the user. In the application context, a number value is always stored with a dot. | Dot | Comma | Optional |
Digits | This field allows you to specify the maximum number of digits entered. | Number | Optional |
Brackets around negative numbers | Choosing YES will display negative numbers in parentheses, e.g. -10 will be displayed as (10). Note that this is display formatting only. The value held in the data object will not include the parentheses. | Yes | No | Optional |
Decimal Separator | In formatted numbers, you can choose to display the separator between integers and decimals as a dot or a comma | Dot | Comma | Mandatory |
Thousands Separator | In formatted numbers, you can choose to display thousands separators as a comma (1,234,567) or dot (1.234.567) or none (1234567) | None | Dot | Comma | Mandatory |
Input Type Combinations
See the table below for a chart showing which part options appear with which "input type".
Deprecated options have been superseded by better functionality, and are no longer available in LogicNets Release 7.4
Style Tab Options
Field Name | Description/Use | Type/Options | Optional/Mandatory |
Style class | This is the field where you can define the CSS style class the system applies to the input control. | Text | Optional |
Element template | This field contains the name of the part template assigned to this part type. See part templates for more information. | Data Object | Optional |
Disabled |
|
Yes | No | Optional |
Validate Tab Options
Field Name | Description/Use | Type/Options | Optional/Mandatory |
Type | You can set validation checking on the field. If the user enters data (or fails to enter data) that violates the validation, the system will trigger a validation error.
|
Options | Optional |
Condition | This field is only required when type equals custom, minimum value, maximum value, custom warning, or custom popup. | Text | Optional |
Message |
|
Text | Optional |
Style | This is only required when type=custom warning. It is the name of the style class that controls the text input. | Text | Optional |
Autocomplete Tab Options
Field Name | Description/Use | Type/Options | Optional/Mandatory |
Mode |
|
None | Collection | Resources | Optional |
Search SQL | The SQL query used to search the database table for items that match the typed in text. The query must contain :val. E.g. SELECT * FROM sample WHERE caption like '%' || :val || '%' (where the table is named 'sample' and the 'caption' column stores the value that must be searched. For SQLite but MS SQL the || must be replaced with +). The execution of the query ‘val’ will be replaced by the typed in text. The items from the result set of the SQL query will be added to the auto-complete list. The caption of the item in the auto-complete list is specified by the “caption column” parameter. |
Text | Optional |
Database | The name of the database alias that is used to run the Search SQL query on. If left empty the current application database is used. | Text | Optional |
Collection | This is the data object holding the collection for populating the entries in the auto-complete list. This collection can be a collection of strings, numbers, or a collection of complex values. | Data Object | Optional |
Collection type | This is the type of the collection. Select ‘table’ if the collection contains items that are complex values; for example: | Select array if the collection is just a collection of strings/numbers; for example:Table | Array | Optional |
Caption column | This field specifies which field of the items in the collection/result set of the SQL query the system should use as the caption for the items in the auto-complete list. When the caption column parameter is not specified, the system will compose a caption of the concatenation of all fields, with exception of the key-column field, of the item. In collection mode, the system will also use the caption for matching the items in the collection with the typed in text. And only the matching items will be added to the auto-complete list. In collection mode, this option is not available if the collection is of the type ‘array’. |
Data Object | Optional |
Key column | In collection mode, this option is not available if the collection is of the type ‘array’. | Text | Optional |
Select key column value (only when the Key column is filled in) | When this checkbox is checked the system will select the value of the key-column field of the selected item from the autocomplete list as the text input instead of the caption itself. You can use this option to select another value in the text input than what is shown in the auto-complete list. This parameter is only available when the key-column field is specified. |
Checkbox | Optional |
Auto Complete as dropdown | The parameter specifies whether the text input should exhibit similar behavior as a dropdown box. In dropdown mode, the input will only allow text that is selectable from the auto-complete list. If the user types in text that is not in the auto-complete list, the system will restore the last known good value after submit. | Yes | No | Optional |
Javascript | This is JavaScript executed in the browser when the user selects an option from the auto-complete dropdown list. | Text | Optional |
Advanced Tab Options
Field Name | Description/Use | Type/Options | Optional/Mandatory |
Captions | This allows you to specify different captions based on rules. The system only displays one caption, the last caption in the table the rule determines to be true. If there is no rule the system determines to be true, the system uses the 'standard' caption. For an example, see Multi-Caption Example Project. | Text | Optional |
Disable logging | If this is checked, the system will not add the item to the data_log. | Checkbox | Optional |
Disable escaping | If this is checked the system will not escape the HTML. | Checkbox | Optional |
Configuration Options
Configuration | Description |
_context.quick_designer_support | If this is set to 1 the FHIR QUICK parameters are editable in the Designer. |
Example
Please check back for a comprehensive text input part example project, which shows several use cases of the text input feature.
For an example of text masking, see the Text Input Masking example.