Submit
Displays a button to submit the form. The submit button will appear disabled until the form is valid.
Interface
interface ISubmitField extends IBaseField {
label: string;
endpoint: string;
method: IMethod;
showCancel?: boolean;
labelCancel?: string;
labelSubmitting?: string;
redirectUrl?: string;
}
Example
Submit
{
"name": "submit",
"type": "Submit",
"label": {
"t": "forms.create"
},
"showCancel": true,
"endpoint": "{@togoSettings.apiEndpoints.provisioning}/AddonContent/Add",
"method": "post",
"redirectUrl": "{url}"
}
Properties
type
Must be “Submit”.
-
Type:
"Submit"
-
Required: Yes
label
Text to be displayed on the submit button.
-
Type:
string
-
Required: Yes
endpoint
Url of the API that will be called when clicking on the submit button.
-
Type:
string
-
Required: Yes
method
Method to be used to make the API call.
-
Type:
IMethod
-
Required: Yes
showCancel
If true
, cancel button will be displayed.
-
Type:
boolean
-
Required: No
labelCancel
Text to be displayed on the cancel button.
-
Type:
string
-
Required: No
labelSubmitting
Text to display while the submit call is in progress.
-
Type:
string
-
Required: No
redirectUrl
Url to be redirected to when submit call is finished. In this field, the properties of the response of the submit call can be used as variables.
-
Type:
string
-
Required: No