« Back to Product

Documentation

PopupAlert

Require: IP-Symcon >= 5.0

If the configuration form contains this element, it will be opened when the configuration page is loaded. After the popup has been closed, it is also possible to open it again using dynamics (visible to true).

Example

General Parameters

Parameters Description
name (optional) Name of the PopupAlert
popup Definition of the popup to be opened (parameters can be changed since IP-Symcon 6.1 by linking the parameter names, e.g. popup.closeCaption)
type PopupAlert
visible (optional) (default: true) If visible is initially true, the popup is opened when the instance configuration is opened, otherwise nothing happens. By changing to true, the popup can be opened afterwards. A change to false closes a currently open popup. (since IP-Symcon 5.2)

Parameters for popup

Parameters Description
buttons (optional) (default: []) A list of buttons which is shown in the popup at the bottom right. The close button is always displayed first, followed by the buttons described here in sequence (since IP-Symcon 6.1)
closeCaption (optional) (default: "OK") The caption of the close button in the lower right corner of the popup
items List of form fields in the popup (cannot be changed)

Parameters for buttons

Parameters Description
caption Visible caption of the button
onClick Script that is executed when the button is clicked. If the script consists of several lines, the individual lines can also be defined as an array. No PHP-tags are required. It has the same properties as onClick of the Button. If the script does not produce any output, the popup is closed after the script has been processed. Otherwise the output is shown as a red error message at the bottom of the popup. There is an exception here if the return begins with the prefix "MESSAGE:". In this case the popup is closed and the return is displayed after the prefix in a message dialog.
enabled (optional) (default: true) If true, the button can be used, otherwise it is displayed as deactivated

Example

{
     "type": "PopupAlert",
     "popup": {
         "closeCaption": "I understand",
         "items": [
             {
                "type": "Label",
                "caption": "Be careful when configuring this instance. Even small changes can have significant impact!"
             }
         ]
     }
 },
 {
     "type": "PopupAlert",
     "popup": {
         "items": [
             {
                  "type": "SelectVariable",
                  "name": "VariableActionTest",
                  "caption": "Some Action Variable"
             }
         ]
     }
 }
Any questions?