Form
Rendering
Form elementlər saytdakı formları idarə edir.
Formlar page detail endpointində groups ->{{group_name}}->forms obyektində keylərinə uyğun saxlanılır.
Əlaqəli endpoint: Page-Detail Swagger
nümunə:
"forms": {
"request": {
"id": 2,
"name": "request",
"title":"Request Form",
"submit_text":"Send",
"fields": [
{
"id": 2,
"label": "ad",
"key": "name",
"type": "text",
"is_required": false,
"validation": {}
}
]
}
}
İstifadə olunacaq məlumatlar:
form obyekti
| key | məlumat | çoxdil |
|---|---|---|
fields |
Formun render olunmalı fieldlərini saxlayır | - |
title |
Formda ehtiyac varsa title istifadə etmək | Var |
submit_text |
Submit button və ya linkin labeli | Var |
fields arrayi
| key | məlumat | çoxdil |
|---|---|---|
label |
fieldin interfeysdə görsənməli olan labelı | Var |
key |
form submit olanda fieldi identifikasiya edən keyword | - |
type |
fieldin interfeysdə hansı tipdə render olunması | - |
is_required |
bu fieldin doldurulması məcburidi ya yox | - |
type siyahısı
textinputtextareatextareaphonenumberemailemaildatedatepickertimetimepcikerdatetimedatetimepicker
Submiting
User məlumatları doldurduqdan sonra məlumatlar submit olunmalıdı
Form Submit Endpointi: Swagger
Nümunə request:
{
"form":"request",
"data":{
"name":"zakir"
}
}
| key | məlumat |
|---|---|
form |
data göndərilən formun key-i |
data |
göndərilən data obyekti field_key-value formatında |
Response
HTTP STATUS code 201
{
"message":"Succesfully Sent"
}
| key | məlumat |
|---|---|
message |
Uğurlu mesaj |