getFormByMarker
Bir form nesnesini işaretçi ile almak.
Bu yöntem, API'den metinsel tanımlayıcısına (işaretçi) dayalı olarak tek bir form nesnesini alır. Bir FormEntity nesnesine çözülmekte olan bir Promise döndürür.
Forms.getFormByMarker(
marker,
langCode
);
Minimal örnek
const value = await Forms.getFormByMarker('my-form');
Özelliklerle örnek
const value = await Forms.getFormByMarker('my-form', 'en_US');
Parametreler şeması
Şema
marker(gerekli): string
Formun işaretçisi
örnek: "contact_form"
langCode: string
Dil kodu. Varsayılan: "en_US"
örnek: "en_US"
Örnek yanıt
{
"id": 6,
"attributeSetId": 15,
"type": "data",
"localizeInfos": {
"title": "Test form",
"titleForSite": "",
"successMessage": "",
"unsuccessMessage": "",
"urlAddress": "",
"database": "0",
"script": "0"
},
"version": 4,
"position": 1,
"identifier": "test-form",
"processingType": "script",
"templateId": null,
"attributes": [
{
"type": "string",
"marker": "name",
"isLogin": null,
"isSignUp": null,
"position": 1,
"settings": {},
"isVisible": true,
"listTitles": [],
"validators": {},
"localizeInfos": {
"title": "İsim"
},
"additionalFields": [],
"isNotificationEmail": null,
"isNotificationPhoneSMS": null,
"isNotificationPhonePush": null
},
{
"type": "file",
"marker": "file",
"isLogin": null,
"isSignUp": null,
"position": 2,
"settings": {},
"isVisible": true,
"listTitles": [],
"validators": {},
"localizeInfos": {
"title": "Dosya"
},
"additionalFields": [],
"isNotificationEmail": null,
"isNotificationPhoneSMS": null,
"isNotificationPhonePush": null
}
]
}
Yanıt şeması
Şema: IFormsEntity
id: number
Nesnenin tanımlayıcısı.
örnek: 12345
attributeSetId: number | null
Kullanılan özellik setinin tanımlayıcısı veya geçerli değilse null.
örnek: 1234
type: string | null
Form türü.
örnek: "contact"
localizeInfos: ILocalizeInfo
Yerelleştirmeyi dikkate alarak formun adı.
örnek:
{
"key": "value"
}
version: number
Nesnenin sürüm numarası.
örnek: 1
position: number
Nesnenin konumu.
örnek: 1
identifier: string
Kayıt alanı için metinsel tanımlayıcı.
örnek: "form_contact_us"
processingType: string
Form işleme türü.
örnek: "async"
templateId: number | null
Form tarafından kullanılan şablonun tanımlayıcısı veya hiç şablon kullanılmıyorsa null.
örnek: 6789
attributes: IAttributes[] | Record<string, any>
Formun özellikleri, bir dizi özellik nesnesi veya anahtar-değer çiftleri kaydı olabilir.
örnek:
{
"key": "value"
}