Skip to content

Instantly share code, notes, and snippets.

@travist
Created September 2, 2016 13:03
Show Gist options
  • Save travist/cde04596daa772dff60ea9c7981db76b to your computer and use it in GitHub Desktop.
Save travist/cde04596daa772dff60ea9c7981db76b to your computer and use it in GitHub Desktop.
if ($scope.action) {
var method = submissionData._id ? 'put' : 'post';
$http[method]($scope.action, submissionData, {
disableJWT: true,
headers: {
Authorization: undefined,
Pragma: undefined,
'Cache-Control': undefined
}
}).success(function(submission) {
Formio.clearCache();
onSubmitDone(method, submission);
}).error(FormioScope.onError($scope, $element))
.finally(function() {
form.submitting = false;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment