Skip to content

Instantly share code, notes, and snippets.

@travist
Created August 31, 2016 21:30
Show Gist options
  • Save travist/7132676025d226fd637f197c5be94368 to your computer and use it in GitHub Desktop.
Save travist/7132676025d226fd637f197c5be94368 to your computer and use it in GitHub Desktop.
Submitting Form.io Form using jQuery ajax
var submission = {
data: {
firstName: 'Test',
lastName: 'Person',
email: '[email protected]',
phoneNumber: '123123123123'
}
};
var settings = {
"async": true,
"crossDomain": true,
"url": "https://myproject.form.io/myform",
"method": "POST",
"headers": {
"content-type": "application/json",
"cache-control": "no-cache"
},
"processData": false,
"data": JSON.stringify(submission)
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment