getAllForms
Lấy tất cả các đối tượng biểu mẫu.
Forms?.getAllForms( langCode?, offset?, limit? );
Ví dụ tối thiểu
const value = await Forms.getAllForms()
Schema
langCode: string
Mã ngôn ngữ. Mặc định: "en_US"
ví dụ: "en_US"
offset: number
Tham số cho phân trang. Mặc định: 0
ví dụ: 0
limit: number
Tham số cho phân trang. Mặc định: 30
ví dụ: 30
Phương thức này lấy tất cả các đối tượng biểu mẫu từ API. Nó trả về một Promise mà khi hoàn thành sẽ trả về một mảng các đối tượng FormEntity.
Ví dụ ph ản hồi
[
{
"id": 9,
"attributeSetId": 20,
"type": "sing_in_up",
"localizeInfos": {
"title": "Đăng ký",
"titleForSite": "",
"successMessage": "",
"unsuccessMessage": "",
"urlAddress": "",
"database": "0",
"script": "0"
},
"version": 0,
"position": 1,
"identifier": "reg",
"processingType": "script",
"templateId": null,
"attributes": [
{
"type": "string",
"marker": "email_reg",
"isLogin": true,
"isSignUp": false,
"position": 1,
"settings": {},
"isVisible": true,
"listTitles": [],
"validators": {
"emailInspectionValidator": true
},
"localizeInfos": {
"title": "email"
},
"additionalFields": [],
"isNotificationEmail": false,
"isNotificationPhoneSMS": null,
"isNotificationPhonePush": null
},
{
"type": "string",
"marker": "password_reg",
"isLogin": null,
"isSignUp": false,
"position": 2,
"settings": {},
"isVisible": true,
"listTitles": [],
"validators": {
"requiredValidator": {
"strict": true
},
"stringInspectionValidator": {
"stringMax": 0,
"stringMin": 0,
"stringLength": 0
}
},
"localizeInfos": {
"title": "mật khẩu"
},
"additionalFields": [],
"isNotificationEmail": false,
"isNotificationPhoneSMS": null,
"isNotificationPhonePush": null
},
{
"type": "string",
"marker": "name_reg",
"isLogin": null,
"isSignUp": true,
"position": 3,
"settings": {},
"isVisible": true,
"listTitles": [],
"validators": {},
"localizeInfos": {
"title": "tên"
},
"additionalFields": [],
"isNotificationEmail": false,
"isNotificationPhoneSMS": null,
"isNotificationPhonePush": null
},
"..."
]
},
{
"id": 11,
"attributeSetId": 28,
"type": "data",
"localizeInfos": {
"title": "Lịch trình",
"titleForSite": "",
"successMessage": "",
"unsuccessMessage": "",
"urlAddress": "",
"database": "0",
"script": "0"
},
"version": 0,
"position": 2,
"identifier": "schedule_form",
"processingType": "script",
"templateId": null,
"attributes": [
{
"type": "timeInterval",
"marker": "schedule",
"isLogin": null,
"isSignUp": null,
"position": 1,
"settings": {},
"isVisible": true,
"listTitles": [],
"validators": {},
"localizeInfos": {
"title": "Lịch trình",
"intervals": [
{
"id": "f88c8793-798d-4fb1-9f8f-7b2013bcf04f",
"range": [
"2025-05-07T21:00:00.000Z",
"2025-05-07T21:00:00.000Z"
],
"external": [],
"intervals": [
{
"id": "47851bf0-1d39-422f-a155-3a6ba1d00a13",
"end": {
"hours": 12,
"minutes": 0
},
"start": {
"hours": 9,
"minutes": 0
},
"period": 60
}
],
"inEveryWeek": true,
"inEveryMonth": true
}
]
},
"additionalFields": [],
"isNotificationEmail": null,
"isNotificationPhoneSMS": null,
"isNotificationPhonePush": null
}
]
},
{
"id": 10,
"attributeSetId": 16,
"type": null,
"localizeInfos": {
"title": "Biểu mẫu thu thập ru_RU",
"titleForSite": "",
"successMessage": "",
"unsuccessMessage": "",
"urlAddress": "",
"database": "0",
"script": "0"
},
"version": 0,
"position": 3,
"identifier": "collection_form",
"processingType": "script",
"templateId": null,
"attributes": {}
},
"..."
]
Schema
id: number
Định danh của đối tượng.
ví dụ: 12345
attributeSetId: number | null
Định danh của bộ thuộc tính đang được sử dụng, hoặc null nếu không áp dụng.
ví dụ: 1234
type: string | null
Loại biểu mẫu.
ví dụ: "contact"
localizeInfos: ILocalizeInfo
Tên của biểu mẫu, có tính đến việc địa phương hóa.
ví dụ:
{
"key": "value"
}
version: number
Số phiên bản của đối tượng.
ví dụ: 1
position: number
Vị trí của đối tượng.
ví dụ: 1
identifier: string
Định danh văn bản cho trường bản ghi.
ví dụ: "form_contact_us"
processingType: string
Loại xử lý biểu mẫu.
ví dụ: "async"
templateId: number | null
Định danh của mẫu được sử dụng bởi biểu mẫu, hoặc null nếu không sử dụng mẫu nào.
ví dụ: 6789
attributes: IAttributes[] | Record<string, any>
Các thuộc tính của biểu mẫu, có thể là một mảng các đối tượng thuộc tính hoặc một bản ghi các cặp khóa-giá trị.
ví dụ:
{
"key": "value"
}