Skip to main content

getFormByMarker

Getting one form object by marker

Forms.getFormByMarker(marker, langCode)

const value = await Forms.getFormByMarker('my-form')
Schema

marker:* string
Marker of form
example: my-form

langCode: string
Language code. Default "en_US"
example: en_US

This method retrieves a single form object based on its textual identifier (marker) from the API. It returns a Promise that resolves to a FormEntity object.

Example return:

{
"id": 1764,
"attributeSetId": 0,
"processingType": "email",
"localizeInfos": {
"title": "My Form",
"titleForSite": "",
"successMessage": "",
"unsuccessMessage": "",
"urlAddress": "",
"database": "0",
"script": "0"
},
"processingData": "Unknown Type: ProcessingData",
"version": 10,
"type": "data",
"identifier": "catalog",
"position": 192,
"attributes": [
{
"type": "list",
"marker": "l1",
"position": 2,
"settings": {},
"listTitles": [
{
"title": "red",
"value": 1,
"position": 1,
"extendedValue": null,
"extendedValueType": null
},
{
"title": "yellow",
"value": 2,
"position": 2,
"extendedValue": null,
"extendedValueType": null
}
],
"validators": {},
"localizeInfos": {
"title": "l1"
}
}
]
}
Schema

id: number
object identifier
example: 1764

attributeSetId: number
identifier of the attribute set used

processingType: string
form processing type
example: email

localizeInfos: FormLocalizeInfos
form name with localization
Enum: [ db, email, script ] example:

{
"en_US": {
"title": "My Form",
"titleForSite": "",
"successMessage": "",
"unsuccessMessage": "",
"urlAddress": "",
"database": "0",
"script": "0"
}
}

processingData: ProcessingData
form data

version: number
object version number
example: 10

identifier: string
textual identifier for the record field
example: catalog
default: marker

position: number
position number (for sorting)
example: 192

position: string
Form type
example: 'data'

attributes:
array of attribute values from the used attribute set for displaying the form (taking into account the specified language)
example:

[
{
"type": "list",
"marker": "l1",
"position": 2,
"listTitles": [
{
"title": "red",
"value": 1,
"position": 1,
"extendedValue": null,
"extendedValueType": null
},
{
"title": "yellow",
"value": 2,
"position": 2,
"extendedValue": null,
"extendedValueType": null
}
],
"validators": {},
"localizeInfos": {
"title": "l1"
}
}
]