Alert Objects
- Last UpdatedOct 30, 2024
- 2 minute read
The ALERT object provides a simple way of giving a warning or getting a response from you, avoiding the necessity of creating a separate form. Where an alert needs a simple acknowledgement by you, this can be achieved by pressing the spacebar or the Enter key on the keyboard.
Note:
Alerts are always blocking: they prevent interaction with any other form until they
have been actioned.
Below are some examples of how you can define different kinds of alerts:
|
Code |
Effect |
|---|---|
|
!!Alert.Error |
Defines a simple error alert with an acknowledge button at the current cursor position: Note that the result, which is always 'YES', has here been discarded. |
|
!!Alert.Message |
Displays a message alert with an acknowledge button at the current cursor position. |
|
!!Alert.Warning |
Displays a warning alert with an acknowledge button at the current cursor position. |
|
!Answer = !!Alert.Confirm |
Displays a confirm alert at the current cursor position. This example comes up with two buttons: 'YES' and 'NO', delivering the corresponding text as the string result. |
|
!Answer = !!Alert.Question |
Displays a question alert at the current cursor position: This example comes up with three buttons: 'YES', 'NO' and 'CANCEL' delivering the corresponding text as the string result. |
|
!Answer = !!Alert.Input |
Displays an input alert at the current cursor position: The first string appears as the prompt, and the second string is the default entry in the text box if you do not supply a value. |