submit
The submit is an action that transmits the current form to the backend system.
For this, a POST-Message is sent.
The response is an action to be performed Action is expected as the response.
The structure of the message exchange is here can be found here.
A submit is usually initiated by the user via a Button button.
Before the submit is sent, a Validation is carried out. The submit is canceled if the Validation Errors occur during validation.
Overview
action("submit")-
Action to be executed.
payload(SubmitActionPayload)-
Object containing the url to be specified.
SubmitActionPayload
url(string)-
Url of the server. If not specified, the submitUrl is used in the configuration. If this url is also not specified, the submit fails directly and the user receives the error message "missing submitUrl".
Example
In the following example, triggering the submit leads to an error, as no message is returned from a server. However, the submit message with the current status of the form is sent, which can be seen in the Network tab of the developer tools, for example. A "server-side failure" message is displayed for the user.
Example submit.json
{
"metaData": {
"id": 0,
"version": 0
},
"configuration": {
"submitUrl": "http://localhost:3000/test"
},
"components": [
{
"type": "container",
"label": "Submit",
"components": [
{
"type": "button",
"action": "submit",
"label": "Submit Button"
},
{
"type": "textfield",
"value": "${/data/someValue}"
}
]
}
],
"state": {
"data": {
"someValue": "Hello"
}
}
}