Form Submissions

How to create submissions

All submissions are created via our back-end POST action. This end-point is open for you to create submissions from your website progamatically with an HTTP Post request, or via our embedded interface which renders your form on our website. Once you create a form, we generate several snippets for you to get started with including an example using plain HTML markup, an example using a vanilla JavaScript XMLHTTPRequest, and an example using the vanilla JavaScript Fetch api.

JavaScript Example

fetch('https://forms.jrdn.tech:44333/Submit/31', {
    method: 'POST',
    body: JSON.stringify({
        date: '', // Type: Date
        radio: '', // options: (1, 2, 3, 4)
        dropdown: '', // options: (1, 2, 3, 4)
        checkbox: '', // options: (1, 2, 3, 4)
    }),
    headers:{
        'Content-Type': 'application/json'
    }
}).then(res => res.json())
.then(response => console.log('Success:', JSON.stringify(response)))
.catch(error => console.error('Error:', error));

Validation Errors

If the submission fails validation, an errors response will be sent back from the server. Here's an example of an error response in JSON so that you can prepare to display it on your front-end.

{
  success: false,
  errors: {
    date: ["Required"],
    radio: ["Required"],
    "drop down": ["Required"],
    "check box": ["Required"]
  }
}

Each field with errors will be a key in the error object with an array of strings that represent the error messages.

Viewing submissions

Submissions to your form can be viewed from the form dashboard.