Skip to main content

getAllForms

Get all form objects.

Description

This method retrieves all form objects with pagination. It returns a Promise that resolves to an IFormsResponse object containing items and total count.

Forms.getAllForms(

langCode, offset, limit

);

Parameters schema

Schema

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

offset: number
Parameter for pagination. Default: 0
example: 0

limit: number
Parameter for pagination. Default: 30
example: 30

By default, you can retrieve 10 objects. This is due to the record limit in the module's permissions settings.
For pagination to work correctly, you need to configure Module permissions according to your needs in the corresponding section.

Examples

Try it live

Run this method interactively in the JS SDK sandbox — connect your Project URL and App Token on first visit, then open:

  • Get all forms — retrieve every form configured in the project.

Minimal example

const response = await Forms.getAllForms();

Example with attributes

const response = await Forms.getAllForms('en_US', 0, 30);

Example response

{
"items": [
{
"id": 4,
"attributeSetId": 11,
"type": "data",
"localizeInfos": {
"title": "user_form",
"titleForSite": "",
"successMessage": "",
"unsuccessMessage": "",
"urlAddress": "",
"database": "0",
"script": "0"
},
"version": 9,
"position": 1,
"identifier": "user_form",
"processingType": "script",
"templateId": null,
"attributes": [
{
"type": "string",
"marker": "name_attr",
"isLogin": false,
"isSignUp": false,
"position": 1,
"settings": {},
"isVisible": true,
"isPassword": false,
"listTitles": [],
"validators": {},
"initialValue": null,
"localizeInfos": {
"title": "name"
},
"additionalFields": {},
"isSignUpRequired": false,
"isNotificationEmail": false,
"isNotificationPhoneSMS": false,
"isNotificationPhonePush": false
},
{
"type": "string",
"marker": "username",
"isLogin": true,
"isSignUp": false,
"position": 2,
"settings": {},
"isVisible": true,
"isPassword": false,
"listTitles": [],
"validators": {},
"initialValue": null,
"localizeInfos": {
"title": "username"
},
"additionalFields": {},
"isSignUpRequired": false,
"isNotificationEmail": false,
"isNotificationPhoneSMS": false,
"isNotificationPhonePush": false
},
{
"type": "string",
"marker": "password",
"isLogin": false,
"isSignUp": false,
"position": 3,
"settings": {},
"isVisible": true,
"isPassword": true,
"listTitles": [],
"validators": {},
"initialValue": null,
"localizeInfos": {
"title": "password"
},
"additionalFields": {},
"isSignUpRequired": false,
"isNotificationEmail": false,
"isNotificationPhoneSMS": false,
"isNotificationPhonePush": false
},
"..."
]
},
{
"id": 6,
"attributeSetId": 15,
"type": "data",
"localizeInfos": {
"title": "Test form",
"titleForSite": "",
"successMessage": "",
"unsuccessMessage": "",
"urlAddress": "",
"database": "0",
"script": "0"
},
"version": 14,
"position": 2,
"identifier": "test-form",
"processingType": "script",
"templateId": null,
"attributes": [
{
"type": "string",
"marker": "name",
"isLogin": false,
"isSignUp": false,
"position": 1,
"settings": {},
"isVisible": true,
"isPassword": false,
"listTitles": [],
"validators": {
"requiredValidator": {
"strict": true
},
"stringInspectionValidator": {
"stringMax": 0,
"stringMin": 0,
"stringLength": 0
}
},
"initialValue": null,
"localizeInfos": {
"title": "Name"
},
"additionalFields": {
"additional_field": {
"type": "string",
"value": "Additional field data",
"marker": "additional_field"
}
},
"isSignUpRequired": false,
"isNotificationEmail": false,
"isNotificationPhoneSMS": false,
"isNotificationPhonePush": false
},
{
"type": "file",
"marker": "file",
"isLogin": false,
"isSignUp": false,
"position": 2,
"settings": {},
"isVisible": true,
"isPassword": false,
"listTitles": [],
"validators": {},
"initialValue": null,
"localizeInfos": {
"title": "File"
},
"additionalFields": {},
"isSignUpRequired": false,
"isNotificationEmail": false,
"isNotificationPhoneSMS": false,
"isNotificationPhonePush": false
}
]
},
{
"id": 7,
"attributeSetId": 15,
"type": "data",
"localizeInfos": {
"title": "File form",
"titleForSite": "Form title (for application)",
"successMessage": "Message about successful data processing",
"unsuccessMessage": "Message about unsuccessful data processing",
"urlAddress": "",
"database": "0",
"script": "0"
},
"version": 15,
"position": 3,
"identifier": "file_form",
"processingType": "script",
"templateId": null,
"attributes": [
{
"type": "string",
"marker": "name",
"isLogin": false,
"isSignUp": false,
"position": 1,
"settings": {},
"isVisible": true,
"isPassword": false,
"listTitles": [],
"validators": {
"requiredValidator": {
"strict": true
},
"stringInspectionValidator": {
"stringMax": 0,
"stringMin": 0,
"stringLength": 0
}
},
"initialValue": null,
"localizeInfos": {
"title": "Name"
},
"additionalFields": {
"additional_field": {
"type": "string",
"value": "Additional field data",
"marker": "additional_field"
}
},
"isSignUpRequired": false,
"isNotificationEmail": false,
"isNotificationPhoneSMS": false,
"isNotificationPhonePush": false
},
{
"type": "file",
"marker": "file",
"isLogin": false,
"isSignUp": false,
"position": 2,
"settings": {},
"isVisible": true,
"isPassword": false,
"listTitles": [],
"validators": {},
"initialValue": null,
"localizeInfos": {
"title": "File"
},
"additionalFields": {},
"isSignUpRequired": false,
"isNotificationEmail": false,
"isNotificationPhoneSMS": false,
"isNotificationPhonePush": false
}
]
},
"..."
],
"total": 9
}

Response schema

Schema: IFormsEntity[]

total: number
Total items count.

items: IFormsEntity[]
Array of form entities.

items.id: number
The identifier of the object.
example: 12345

items.attributeSetId: number | null
The identifier of the attribute set being used, or null if not applicable.
example: 1234

items.type: string | null
Form type.
example: "contact"

items.localizeInfos: IFormLocalizeInfo
The name of the form and form-side localization fields (success/error messages, processing config, etc.).
example:

{
"key": "value"
}

items.version: number
The version number of the object.
example: 1

items.position: number
The position of the object.
example: 1

items.identifier: string
The textual identifier for the record field.
example: "form_contact_us"

items.processingType: string
Type of form processing.
example: "async"

items.templateId: number | null
The identifier of the template used by the form, or null if no template is used.
example: 6789

items.attributes: IFormAttribute[]
Form fields with their localization, validators and form-specific flags.

attributes.marker: string
Field marker (machine name).
example: "email"

attributes.type: AttributeType
Attribute data type (e.g. "string", "file").

attributes.position: number
Sort position of the field.
example: 1

attributes.isVisible: boolean
Whether the field is exposed to the user.
example: true

attributes.localizeInfos: IAttributeLocalizeInfo
Localized labels for the field. For timeInterval attributes, also carries the intervals schedule payload.

attributes.initialValue: unknown
Default value applied when the field is not filled.

attributes.listTitles: IListTitle[]
Predefined options for list/radioButton fields; empty array for other types.

listTitles.title: string
The title or name associated with the list item.
example: "Item Name"

listTitles.value: number | string
The value of the list item, which can be either a number or a string depending on the context.
example: 42

listTitles.position: string | number | null
The position of the list item, which can be represented as a string, number, or null if not applicable.
example: 1

listTitles.extended: object
An object containing additional properties or metadata related to the list item. This could include any extra details that extend the basic information.

listTitles.extended.value: string | null
The extended value, which can be a string or null.
example: "extra_value"

listTitles.extended.type: string | null
The type of the extended value, which can be a string or null.
example: "color"

attributes.validators: IAttributeValidators
Validation rules; empty object when no validators are configured.

validators.requiredValidator: object
Marks the field as required. Shape: { strict: boolean }.
example: { strict: true }

validators.stringInspectionValidator: object
Length constraints for string fields. Shape: { stringMin: number; stringMax: number; stringLength: number }.

validators.emailInspectionValidator: boolean
Toggle for email-format validation.

validators.defaultValueValidator: object
Default value configuration with optional custom error text. Shape: { customErrorText?: string; fieldDefaultValue?: unknown; fieldDefaultValue2?: unknown }.

attributes.settings: Record<string, unknown>
Field-specific configuration; empty object by default.

attributes.additionalFields: Record<string, IFormAttributeAdditionalField>
Nested sub-fields keyed by marker; empty object when none.

attributes.isLogin: boolean
Whether this field carries the login value used for authentication.
example: false

attributes.isSignUp: boolean
Whether this field is required during sign-up.
example: false

attributes.isNotificationEmail: boolean
Whether this field stores the email used for notifications.
example: false

attributes.isNotificationPhonePush: boolean
Whether this field stores the phone number used for push notifications.
example: false

attributes.isNotificationPhoneSMS: boolean
Whether this field stores the phone number used for SMS notifications.
example: false

items.total: number | string
Total count of related entries.
example: "1"

items.moduleFormConfigs: IFormConfig[]
Array of module form configurations associated with the form.

moduleFormConfigs.id: number
The identifier of the form configuration.
example: 123

moduleFormConfigs.formIdentifier: string
The form identifier (only in products/pages API).
example: "review"

moduleFormConfigs.moduleIdentifier: string
The identifier of the module associated with the form configuration.
example: "module_identifier"

moduleFormConfigs.isGlobal: boolean
Indicates whether the form configuration is global.
example: true

moduleFormConfigs.isClosed: boolean
Indicates whether the form configuration is closed.
example: true

moduleFormConfigs.isModerate: boolean
Indicates whether the form requires moderation (only in products/pages API).
example: false

moduleFormConfigs.viewOnlyUserData: boolean
Indicates whether the form configuration allows viewing user data (used in forms API).
example: true

moduleFormConfigs.commentOnlyUserData: boolean
Indicates whether the form configuration allows commenting on user data (used in forms API).
example: true

moduleFormConfigs.viewOnlyMyData: boolean
Indicates whether the form configuration allows viewing my data (used in products/pages API).
example: false

moduleFormConfigs.commentOnlyMyData: boolean
Indicates whether the form configuration allows commenting on my data (used in products/pages API).
example: false

moduleFormConfigs.entityIdentifiers: object[]
An array of entity identifiers associated with the form configuration.

moduleFormConfigs.nestedEntityIdentifiers: string[]
An array of nested entity identifier strings (only in products/pages API).
example: ["catalog"]

moduleFormConfigs.exceptionIds: string[]
An array of exception identifiers.

moduleFormConfigs.formDataCount: number
Total count of form data entries (only in products/pages API).
example: 306

moduleFormConfigs.entityFormDataCount: Record<string, number>
Form data count per entity identifier (only in products/pages API).
example: {"catalog": 306}

moduleFormConfigs.isRating: boolean | null
Indicates whether this form config is for ratings.
example: null

moduleFormConfigs.isAnonymous: boolean | null
Indicates whether anonymous submissions are allowed.
example: null

moduleFormConfigs.allowHalfRatings: boolean | null
Indicates whether half ratings are allowed.
example: null

moduleFormConfigs.allowRerating: boolean | null
Indicates whether re-rating is allowed.
example: null

moduleFormConfigs.maxRatingScale: number | null
Maximum rating scale value.
example: 5

moduleFormConfigs.ratingCalculation: string
Rating calculation method.
example: "average"