Web Form

Add a front-end web form to your Node-RED application. The example provides a simple form to register a network client. This is common for an IoT self-service portal with a WiFi network.

This flow will present an HTML page by creating an HTTP GET path and responding with the combination of JS, CSS & HTML template nodes that build a web page.

It also provides an HTTP POST path, which will handle the form submission.

flow.json

The JavaScript template will handle extracting the values from the web form and making and API request to our POST endpoint.

The HTML template will create the web form, where each input box will represent a parameter in our msg.payload.

Once the data has been received from the form, a function node will adjust the msg object with the required format for the Meraki node to provision the client.

Once the API request has been completed by the Meraki node, the results will be sent back to the web client to confirm the status. A clientId will now be included with submitted details.