SAVE(values)
data.save().then(function(data) {
console.log("Saved as: " + data.permalink());
});
data.save({ status: "Completed" });
Saves the submission, and any changes that have been made, to the server. Returns a promise.
The optional values
argument lets you pass field values in the format { field_name: value }
, which will be added to the submission and saved.