notification

Diese Aktion blendet lokal im Browser eine Pop-up-Nachricht am Bildschirmrand ein, die nach 5 Sekunden automatisch wieder verschwindet, und löst selbst keine Server-Kommunikation aus. Für längere Meldungen, die aktiv bestätigt werden müssen, bietet sich stattdessen dialog an. Sie eignet sich unter anderem als Folgeaktion in der Server-Response eines submit, um kurze Rückmeldungen (z. B. Erfolgsmeldungen) anzuzeigen.

Übersicht

action ("notification")

Auszuführende Aktion.

payload (MessagePayload)

Definiert Aussehen und Inhalt der Nachricht.

Beispiel

notification.json
{
  "$schema": "https://forms.virtimo.net/5.0.x/schema.json",
  "metaData": {
    "id": "0",
    "version": 0
  },
  "configuration": {
  },
  "components": [
    {
      "type": "container",
      "languageButton": true,
      "components": [
        {
          "type": "button",
          "label": "success",
          "onClick": {
            "action": "notification",
            "payload": {
              "message": "Success message"
            }
          }
        },
        {
          "type": "button",
          "label": "error",
          "onClick": {
            "action": "notification",
            "payload": {
              "type": "error",
              "message": "Error message"
            }
          }
        },
        {
          "type": "button",
          "label": "info",
          "onClick": {
            "action": "notification",
            "payload": {
              "type": "info",
              "message": "Information message"
            }
          }
        },
        {
          "type": "button",
          "label": "custom",
          "onClick": {
            "action": "notification",
            "payload": {
              "icon": "fas fa-headphones",
              "color": "#b32ab5",
              "title": {
                "MULTI_LANGUAGE": {
                  "de": "Überschrift",
                  "en": "Headline"
                }
              },
              "message": {
                "MULTI_LANGUAGE": {
                  "de": "Inhalt",
                  "en": "Content"
                }
              }
            }
          }
        }
      ]
    }
  ]
}
Eingebettete Vorschau

Keywords: