Property description
The form property adds a button to section titles to create custom forms.
Minimal JSON
The following minimal JSON applies to the form action type. A form allows you to call values from backend (e.g., add an object relation to your table) using a custom form.
Minimal JSON
{
"type": "form",
"api": "",
"formId": "",
"successApiCallToast": "",
"errorApiCallToast": "",
"template": []
}
Example JSON
{
"type": "form",
"api": "https://help.dawiso.com/api/url/1",
"formId": "unique ID within package",
"title": "title.translationKey",
"successApiCallToast": "title.translationKey_success",
"errorApiCallToast": "title.translationKey_error",
"template": [
{
"type": "form-attribute",
"title": "title.translationKey_1",
"apiDataKey": "api_data_key_1",
"elementType": "is_checkbox",
"api": "https://help.dawiso.com/api/url/1"
},
{
"type": "form-user",
"title": "title.translationKey_2",
"apiDataKey": "api_data_key_2"
},
{
"type": "form-relation",
"title": "title.translationKey_3",
"apiDataKey": "api_data_key",
"relationTypeKey": "core_steward_3"
}
]
}
Nested properties
| Property | Description | Values | Mandatory |
|---|---|---|---|
type | form | string | Yes |
api | A relative or absolute URL that calls the API after the confirm button is pressed. | string | Yes |
formId | Unique form ID within the package. | string | Yes |
title | Translation key of the title. Define the key in translations to specify how the text is displayed in the UI. Unlike the name property, if you use a specific string of text for the title, this text will appear with the package key. For example, Comment Section will be displayed as package_key_comment section. | string | Yes |
successApiCallToast | Message displayed when the API call is successful. | string | Yes |
errorApiCallToast | Message displayed when the API call is unsuccessful. | string | Yes |
template | Defines the form’s fields. | array | Yes |