0

Text Input, Numeric Input

  • updated 12 days ago

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 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.

Note: You can use the ‘Placeholder’ field to provide your users with a hint about the required mask format. Here is an example project for this functionality.
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:
  • Read Only: any value assigned to this variable (e,g, via a process step or default value) will be stored in the log and will continue to show on screen and impact any downstream logic on click. Use this for inputs that are not set by the user, but should be displayed along with user-defined inputs
  • Disabled: any value assigned to this part is not stored in the log. As a consequence, it will only show if the upstream logic continues to set the variable. Use this to maintain form look and feel when the input is not always required
Note that the browser will by default display the read only input as per an editable input, and the disabled part will show "greyed out". These effects can be cancelled/overridden by custom CSS settings as necessary.
Dropdown Optional
Data object type
  • text: The user input will be written as a text string in the context.
  • number: The user input will be written as a number value in the context. A nil value is written into the context when the user fills a non-number value.
Note: Older versions of LogicNets also use numeric but the numeric type is depreciated and is replaced by number.
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: The user can enter any characters.
  • number: The user can only enter numeric characters.
  • password: The user can enter any characters. The system masks the characters for privacy unless the Designer user checks the Allow show/hide password checkbox.
  • formatted number: The user can display a numeric input with various styled components such as thousand separators, parentheses for negatives, etc.
  • formatted text: (LogicNets Release 7.4 on) The user can display a text input with additional styled elements, such as prefix, postfix.
Depending on the input type selected, one or more of the options below are revealed in the part editor.
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.
  • If the Input type is number then this field is shown as a dropdown with predefined options.
  • If the input type is formatted number then this is shown as a user input field.
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
  • no: The user is able to enter/change the value of the field.
  • yes: The user is not able to enter/change the value of the field.
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.
  • mandatory: If the validation is set to mandatory the user must enter a value in the field.
  • numeric, percentage, currency: If the validation is set to one of these the user must enter a number in the field. The user's entry can contain a comma or dot as a decimal character. This validation rule can be used when the data object type is set to text. This combination allows the user to enter a decimal number and use either a comma or a period.
  • time: Time validation input must be entered in the form of a string: hh:mm or hhmm. 12:14 and 1214 are both allowed.
  • custom: You can set a custom validation option. See below for more information.
  • email: To pass the validation check the user must enter a value that includes @.
  • date: The input must be a date string: mm/dd/yy.
  • minimum value: (For numeric inputs) This type allows you to configure a minimum value the user must fill in. Use the format and fill in the number. The validation only triggers when you specify a value is specified. See Min/Max Validation Options Example Project for an example. (v8.1)
  • maximum value: (For numeric inputs) This type allows you to configure a maximum value the user must fill in. Use the Condition format and fill in the number. The validation only triggers when you specify a value is specified. See Min/Max Validation Options Example Project for an example. (v8.1)
  • custom warning: You can assign a CSS style class for the validation. If, for example, the user's entry does not pass the validation checks the system could change the appearance of the input field by turning the background yellow.
  • custom popup: If the user's entry does not meet the validation criteria the system will launch a logicnet in a popup window.
For more information on validation syntax, go to the Setting Conditions article here.
Options Optional
Condition This field is only required when type equals custom, minimum value, maximum value, custom warning, or custom popup. Text Optional
Message
  • Custom: This is the message the system shows the user when a validation rule is violated. The system only displays the message for the first violated rule.
  • minimum value: This is the message the system shows the user when the selected value is less than the configured minimum value. If a message is available, the system triggers a validation error and shows the message. If there is no message the system triggers a validation warning.
  • maximum value: This is the message the system shows the user when the selected value is more than the configured maximum value. If a message is available, the system triggers a validation error. If there is no message the system triggers a validation warning.
  • Custom popup: This is the name of the logicnet the system should launch in the popup.
  • Custom warning: This field can be left empty.
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: Auto-complete functionality is disabled.
  • collection: Auto-complete functionality is enabled and using a collection located in the application context as input for the autocomplete list.
    NOTES:
    • the data object that stores the user selection must be different to the collection itself.
    • Any new value entered is not stored back to the collection (for ASF applications, this could be done in the save/submit logicnets that run on exit)
  • resources: Auto-complete functionality is enabled and using a database table as input for the autocomplete list.
    NOTE:
    • the feature will look for and read records from the published resource table, not the table as shown in the Designer
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:
collection = {
   {
     country = “United States”
     search_names = “United States, USA, 0001”
   },
   {
     country = “Netherlands”
    search_names = “Netherlands, NL, 0031”
   },
  {
     country = “Germany”
     search_names = “Germany, DE, 0049”
  }
}
Select array if the collection is just a collection of strings/numbers; for example:
collection = { “one”, “two”, “three” }.
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 soon for a 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.

Reply Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
Like Follow
  • 1 yr agoLast active
  • 268Views
  • 3 Following

Home