Property description

The form property adds a button to section titles to create custom forms. If the form submission fails, the API error message is shown in the toast and the modal stays open; errorApiCallToast is used as fallback if no error message is returned.

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

PropertyDescriptionValuesMandatory
typeformstringYes
apiA relative or absolute URL that calls the API after the confirm button is pressed.stringYes
formIdUnique form ID within the package.stringYes
titleTranslation 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.stringYes
successApiCallToastMessage displayed when the API call is successful.stringYes
errorApiCallToastMessage displayed when the API call is unsuccessful.stringYes
tableIdsToRefreshList of API table IDs to refresh after a successful form submission.arrayNo
visibleForUserRelationTypeKeysUser relation type keys allowed to see the action. When empty or omitted, the action is not restricted (matches its behavior before this property existed). When non-empty, Dawiso displays the action only to a user who already holds at least one of them.arrayNo
templateDefines the form’s fields. See template.arrayYes