User prompt
See also: User confirmation
The behaviour User prompt calls a modal dialog prompting text input from a user.
Configuration |
User prompt |
|
|
Configuration
Input type defines the type of input:
Input type
Input description
Single line
(default)Single line of text (pressing 'Enter' is equivalent to clicking the OK button).
Multi line
Multiple lines of text (pressing 'Enter' inserts a 'newline').
Formatted
Formatted text by a WYSIWYG text editor (returns HTML format).
xml
json
javaText input from a 'code editor' featuring syntax highlighting and line numbers.
Besides the choices featured in the dropdown (xml, json, java) the editor supports many other formats (perl, php, python, etc.). Instead of a selection, the combobox also accepts direct text input of 'format keys'. Try your luck!
►NOTE◄ Format keys are case-sensitive. While 'html' is supported (see example), 'HTML' is not.Example: A user is prompted for details of a vessel in the format of an HTML table to type in or paste from the clipboard:
Title defines the text in the title bar of the dialog.
Message defines the prompt message shown above the entry field.
Default value source defines the type of source for an optional default value to show in the entry field:
Default value source
Sets default value to ...
Field
... value of the linked field (if any).
Expression
... evaluation result of an expression (e.g. 'VAR(variable)').
Fix value
... static text (as indicated in configuration).
The Full screen option... defines that the dialog should be sized to fill the screen (or rather: the 'view slot').
Width/Height/Min. width/Min. height ... specifies the window size value or minimum window size by CSS units of measurement with Pixel (px) as a default.
►NOTE◄ These settings are not available if the Full screen option is selected.Unit
Description
Examples
px
(default)pixel
'300px', '300'
%
percent
Size is calculated relative to the parent element size.'100%" uses all space available
(minus design padding and the border)em
(typographic unit)
The actual size is scaled relative to the font size (in pt) applicable in the window."10em' define 130pt of width or height, at a given font size of 13pt.
The choice for Resizable defines whether/which dimensions of the modal dialog may be resized by the user.
The option cancel possible defines whether the Cancel button is available in the dialog.
Use case example
Objective
Upon clicking a Button, the user shall be prompted for text input to be stored in a Text field 'Name'. Any existing content of the text field shall appear as a default value in the input field of the user prompt.
Configuration
A behaviour of the User prompt type which is triggered by Click is configured for the Button as shown in the following image. Besides Title and Message texts, the only non-default setting is a link to the Text field 'Name' as a Source field for the default value.
In response to the user submitting input to the Actions on 'true', a Set value action is configured to transfer the entered text($input) from the prompt into the Text field 'Name':
Runtime example
When the form is opened, the Text field 'Name' is empty.
Clicking the Button opens the prompt with an empty input field, since a name is yet to be entered:
For the purpose of demonstration, the name 'Jonas Abend' is entered and confirmed by clicking OK or pressing the 'Enter' key. The dialog is closed and the input appears in the Text field 'Name':
When the Button is clicked again, the user prompt reappears but shows the entered name as a default: 'Jonas Abend':