Created
August 31, 2016 21:30
-
-
Save travist/7132676025d226fd637f197c5be94368 to your computer and use it in GitHub Desktop.
Submitting Form.io Form using jQuery ajax
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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