Secure Forms
- 21 Aug 2024
- 4 Minutes to read
- Print
- DarkLight
Secure Forms
- Updated on 21 Aug 2024
- 4 Minutes to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Secure Forms
You need the Manage Secure Form permission to manage Secure Forms.
Secure Forms
- Secure Forms ManageGET secureform/secureForms
- Get the list of Secure FormsGET secureform/secureForms/{id}
- Get a single Secure FormPOST secureform/secureForms
- Create a new Secure FormPUT secureform/secureForms/{id}
- Update the Secure FormDELETE secureform/secureForms/{id}
- Remove the Secure Form
Secure Form JSON Format
Secure Form is represented as simple flat JSON objects with the following keys:
Name | Type | Description |
---|---|---|
id | guid | Id of the secure form. |
name | string | Name of the secure form. |
description | string | Description of the secure form. |
greetingMessage | string | Greeting message for secure form page. |
color | string | Theme color of the secure form page. |
logo | binary | Base64 encoded string of logo image for secure form page. |
submitButtonText | string | Custom text button for secure form page. |
Fields | Fields[] | Reference to Secure Form Field. |
Secure Form Field JSON Format:
Name | Type | Description |
---|---|---|
id | guid | Id of the secure form field. |
name | string | filed name. |
displayName | string | Display text of this secure form field. |
type | string | enum. text, textArea, radioBox, checkbox, dropdownList, checkboxList, datePicker, cardNumber, expirationDate, CSC/CVV |
order | int | Order of the secure form field option. |
isRequired | bool | if it is required when submit. |
isVisible | bool | if it is visible for visitor/contact. |
isSystem | bool | if it is system field. |
isInputValidationEnabled | bool | Available for field Type Text and Text Area. |
regularExpression | string | Regular expressions for field used to constraints to ensure that the data submitted by users is valid and meets the required format or pattern |
customValidationErrorMessage | string | Available and required when Is Input Validation Enabled is True |
options | option[] | field options. |
Secure Form Field Option JSON Format:
Name | Type | Description |
---|---|---|
id | guid | Id of the secure form field which the secure form field option belongs to. |
fieldId | guid | field Id. |
displayText | string | Display text of this secure form field option. |
order | int | Order of the secure form field option. |
Get the list of Secure Forms
GET secureform/secureForms
Parameters:
Name | Type | Description |
---|---|---|
pageIndex | int | page index, default 1 |
pageSize | int | page size, default 50 |
siteId | int | site ID |
sortBy | string | default: name |
sortOrder | string | default: asc |
Response:
An array of Secure Form
Name | Type | Description |
---|---|---|
secureForms | Secure Form[] | secure form |
nextPage | string | next page URL |
previousPage | string | previous page URL |
total | int | total records count number |
Example
Sample Request:
curl https://api11.comm100.io/v4/secureform/secureForms \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 200 OK
{
"secureForms": [
{
"id": "0065bd4e-34f1-417c-bd65-ec5d1707d8e0",
"name": "test2",
"description": "",
"greetingMessage": "<p>* indicates required fields</p>",
"color": "#4E6B8D",
"submitButtonText": "Submit",
"logo": "",
"fields": [
{
"id": "f8877f44-8daa-41c7-d046-08dca2233aeb",
"secureFormId": "0065bd4e-34f1-417c-bd65-ec5d1707d8e0",
"name": "test field",
"displayName": "test field",
"type": "checkboxList",
"order": 5,
"isRequired": false,
"isVisible": true,
"isSystem": false,
"isInputValidationEnabled": false,
"regularExpression": "",
"customValidationErrorMessage": "",
"options": [
{
"id": "887d1755-74c8-4bbe-6911-08dcbc2f915d",
"fieldId": "f8877f44-8daa-41c7-d046-08dca2233aeb",
"displayText": "option1",
"order": 1
},
{
"id": "089eb5b6-6217-44ed-6912-08dcbc2f915d",
"fieldId": "f8877f44-8daa-41c7-d046-08dca2233aeb",
"displayText": "option2",
"order": 2
},
{
"id": "8116fae7-fe78-496c-6913-08dcbc2f915d",
"fieldId": "f8877f44-8daa-41c7-d046-08dca2233aeb",
"displayText": "option3",
"order": 3
}
]
}
]
}
],
"previousPage": null,
"nextPage": null,
"total": 1
}
Get a single Secure Form
GET /secureform/secureForms/{id}
Parameters:
Name | Type | Description |
---|---|---|
secure form | Secure Form[] | secure form |
Response:
Example
Sample Request:
curl https://api11.comm100.io/v4/secureform/secureForms/0065bd4e-34f1-417c-bd65-ec5d1707d8e0 \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 200 OK
{
"id": "0065bd4e-34f1-417c-bd65-ec5d1707d8e0",
"name": "test2",
"description": "",
"greetingMessage": "<p>* indicates required fields</p>",
"color": "#4E6B8D",
"submitButtonText": "Submit",
"logo": "",
"fields": [
{
"id": "f8877f44-8daa-41c7-d046-08dca2233aeb",
"secureFormId": "0065bd4e-34f1-417c-bd65-ec5d1707d8e0",
"name": "test field",
"displayName": "test field",
"type": "checkboxList",
"order": 5,
"isRequired": false,
"isVisible": true,
"isSystem": false,
"isInputValidationEnabled": false,
"regularExpression": "",
"customValidationErrorMessage": "",
"options": [
{
"id": "887d1755-74c8-4bbe-6911-08dcbc2f915d",
"fieldId": "f8877f44-8daa-41c7-d046-08dca2233aeb",
"displayText": "option1",
"order": 1
},
{
"id": "089eb5b6-6217-44ed-6912-08dcbc2f915d",
"fieldId": "f8877f44-8daa-41c7-d046-08dca2233aeb",
"displayText": "option2",
"order": 2
},
{
"id": "8116fae7-fe78-496c-6913-08dcbc2f915d",
"fieldId": "f8877f44-8daa-41c7-d046-08dca2233aeb",
"displayText": "option3",
"order": 3
}
]
}
]
}
Create a new Secure Form
POST /secureform/secureForms
Parameters:
Name | Type | Required | Description |
---|---|---|---|
name | string | yes | Name of the secure form. |
description | string | no | Description of the secure form. |
greetingMessage | string | yes | Greeting message for secure form page. |
color | string | yes | Theme color of the secure form page. |
logo | binary | no | Base64 encoded string of logo image for secure form page. |
submitButtonText | string | yes | Custom text button for secure form page. |
Fields | Fields[] | yes | Reference to Secure Form Field. |
Response:
Example
Sample Request:
curl https://api11.comm100.io/v4/secureform/secureForms \
-X 'POST' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"name":"Test form5","description":"This is a test form5","greetingMessage": "<p>* indicates required fields</p>", "color": "#4E6B8D","submitButtonText": "Submit","fields":[{"name":"ssss1","displayName": "test field","regularExpression": "","type":"checkboxList","isSystem":false,"isVisible":true,"isRequired":false,"order":0, "customValidationErrorMessage": "","options": [{"displayText": "option1","order": 1}]}]}'
Response:
HTTP/1.1 201 Created
{
"id": "5d8c31b8-47ac-41ff-84d9-23b04cc58f10",
"name": "Test form5",
"description": "This is a test form5",
"greetingMessage": "<p>* indicates required fields</p>",
"color": "#4E6B8D",
"submitButtonText": "Submit",
"logo": "",
"fields": [
{
"id": "19edde38-b76a-4510-d04b-08dca2233aeb",
"secureFormId": "5d8c31b8-47ac-41ff-84d9-23b04cc58f10",
"name": "ssss1",
"displayName": "test field",
"type": "checkboxList",
"order": 0,
"isRequired": false,
"isVisible": true,
"isSystem": false,
"isInputValidationEnabled": false,
"regularExpression": "",
"customValidationErrorMessage": "",
"options": [
{
"id": "db702fa4-16d1-49e6-6918-08dcbc2f915d",
"fieldId": "19edde38-b76a-4510-d04b-08dca2233aeb",
"displayText": "option1",
"order": 0
}
]
}
]
}
Update the Secure Form
PUT /secureform/secureForms/{id}
Parameters:
Name | Type | Description |
---|---|---|
secure form | Secure Form[] | Reference to Secure Form. |
Response:
Example
Sample Request:
curl https://api11.comm100.io/v4/secureform/secureForms/7bc3c5ba-8a52-4666-a3b9-2f42f9bdbd8a \
-X 'PUT' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"id":"7bc3c5ba-8a52-4666-a3b9-2f42f9bdbd8a","name":"Test form6","description":"This is a test form6","greetingMessage":"<p>* indicates required fields</p>","color":"#4E6B8D","submitButtonText":"Submit","logo":"","fields":[{"id":"cc64ea58-b24d-47d7-d045-08dca2233aeb","secureFormId":"7bc3c5ba-8a52-4666-a3b9-2f42f9bdbd8a","name":"test field","displayName":"test field","type":"dropdownList","order":1,"isRequired":false,"isVisible":true,"isSystem":false,"isInputValidationEnabled":false,"regularExpression":"","customValidationErrorMessage":"","options":[{"displayText":"option1","order":0},{"displayText":"option2","order":1}]}]}'
Response:
HTTP/1.1 200 OK
{
"id": "7bc3c5ba-8a52-4666-a3b9-2f42f9bdbd8a",
"name": "Test form6",
"description": "This is a test form6",
"greetingMessage": "<p>* indicates required fields</p>",
"color": "#4E6B8D",
"submitButtonText": "Submit",
"logo": "",
"fields": [{
"id": "cc64ea58-b24d-47d7-d045-08dca2233aeb",
"secureFormId": "7bc3c5ba-8a52-4666-a3b9-2f42f9bdbd8a",
"name": "test field",
"displayName": "test field",
"type": "dropdownList",
"order": 1,
"isRequired": false,
"isVisible": true,
"isSystem": false,
"isInputValidationEnabled": false,
"regularExpression": "",
"customValidationErrorMessage": "",
"options": [{
"id": "720bf1d3-7461-4ab4-691f-08dcbc2f915d",
"fieldId": "cc64ea58-b24d-47d7-d045-08dca2233aeb",
"displayText": "option1",
"order": 1
}, {
"id": "35fa06f7-cb7d-4516-6920-08dcbc2f915d",
"fieldId": "cc64ea58-b24d-47d7-d045-08dca2233aeb",
"displayText": "option2",
"order": 2
}]
}]
}
Remove the Secure Form
DELETE /secureform/secureForms/{id}
Parameters:
No Parameters
Response:
204 No Content
Example
Sample Request:
curl https://api11.comm100.io/v4/secureform/secureForms/1B2A4C26-471B-421C-8CA3-757B2137584A \
-X 'DELETE' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 204 No Content
Was this article helpful?