Secure Forms
  • 21 Aug 2024
  • 4 Minutes to read
  • Dark
    Light

Secure Forms

  • Dark
    Light

Article summary

Secure Forms

You need the Manage Secure Form permission to manage Secure Forms.

Secure Form JSON Format

Secure Form is represented as simple flat JSON objects with the following keys:

NameTypeDescription
idguidId of the secure form.
namestringName of the secure form.
descriptionstringDescription of the secure form.
greetingMessagestringGreeting message for secure form page.
colorstringTheme color of the secure form page.
logobinaryBase64 encoded string of logo image for secure form page.
submitButtonTextstringCustom text button for secure form page.
FieldsFields[]Reference to Secure Form Field.

Secure Form Field JSON Format:

NameTypeDescription
idguidId of the secure form field.
namestringfiled name.
displayNamestringDisplay text of this secure form field.
typestringenum. text, textArea, radioBox, checkbox, dropdownList, checkboxList, datePicker, cardNumber, expirationDate, CSC/CVV
orderintOrder of the secure form field option.
isRequiredboolif it is required when submit.
isVisibleboolif it is visible for visitor/contact.
isSystemboolif it is system field.
isInputValidationEnabledboolAvailable for field Type Text and Text Area.
regularExpressionstringRegular expressions for field used to constraints to ensure that the data submitted by users is valid and meets the required format or pattern
customValidationErrorMessagestringAvailable and required when Is Input Validation Enabled is True
optionsoption[]field options.

Secure Form Field Option JSON Format:

NameTypeDescription
idguidId of the secure form field which the secure form field option belongs to.
fieldIdguidfield Id.
displayTextstringDisplay text of this secure form field option.
orderintOrder of the secure form field option.

Get the list of Secure Forms

GET secureform/secureForms

  • Parameters:

NameTypeDescription
pageIndexintpage index, default 1
pageSizeintpage size, default 50
siteIdintsite ID
sortBystringdefault: name
sortOrderstringdefault: asc
  • Response:

An array of Secure Form

NameTypeDescription
secureFormsSecure Form[]secure form
nextPagestringnext page URL
previousPagestringprevious page URL
totalinttotal 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:

NameTypeDescription
secure formSecure Form[]secure form
  • Response:

Secure Form

  • 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:

NameTypeRequiredDescription
namestringyesName of the secure form.
descriptionstringnoDescription of the secure form.
greetingMessagestringyesGreeting message for secure form page.
colorstringyesTheme color of the secure form page.
logobinarynoBase64 encoded string of logo image for secure form page.
submitButtonTextstringyesCustom text button for secure form page.
FieldsFields[]yesReference to Secure Form Field.
  • Response:

Secure Form

  • 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:

NameTypeDescription
secure formSecure Form[]Reference to Secure Form.
  • Response:

Secure Form

  • 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?

What's Next