Multiple text input in notification

Perhaps you could build up something with the ui-template-node. I found an interesting solution for a modal alert dialog which possibly could be converted to one with input fields:

[
    {
        "id": "06ce0c67de868d70",
        "type": "tab",
        "label": "Flow 5",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "29554d9cf6288f39",
        "type": "ui_template",
        "z": "06ce0c67de868d70",
        "group": "52e13bbe911008c8",
        "name": "",
        "order": 0,
        "width": 0,
        "height": 0,
        "format": "<script>\n(function(scope){\nvar testShowAlert = function ($mdDialog) {\nvar alert = $mdDialog.alert({\ntitle: 'Attention',\ntextContent: 'This is an example of how simple dialogs can be!',\nok: 'Close'\n});\n\n  $mdDialog\n    .show( alert )\n    .finally(function() {\n      alert = undefined;\n    });\n}\n\nscope.showAlert = function() {\n       var injector = angular.element(\"#nr-dashboard\").injector();\n       injector.invoke(testShowAlert,null,null);\n};\n\n})(scope);\n</script>\n<button ng-click=\"showAlert()\">Test Alert</button>",
        "storeOutMessages": true,
        "fwdInMessages": true,
        "resendOnRefresh": true,
        "templateScope": "local",
        "className": "",
        "x": 1000,
        "y": 220,
        "wires": [
            []
        ]
    },
    {
        "id": "52e13bbe911008c8",
        "type": "ui_group",
        "name": "TestGroup",
        "tab": "322aeab29d79e631",
        "order": 1,
        "disp": true,
        "width": "6",
        "collapse": false,
        "className": ""
    },
    {
        "id": "322aeab29d79e631",
        "type": "ui_tab",
        "name": "Alert",
        "icon": "dashboard",
        "order": 4,
        "disabled": false,
        "hidden": false
    }
]

It's from this forum discussion:
https://discourse.nodered.org/t/how-to-show-modal-dialog-in-template-node/611

And the used service is documented here:
https://material.angularjs.org/latest/api/service/$mdDialog#javascript-object-syntax

I didn't go any further!

1 Like