-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ajax PUT for submit #36
Comments
hi, For individual submit it is already done in 1.1.1, have a look on #22 Thank you. |
What a quick answer! 👍 (line 1425) case 'submit': //collects value, validate and submit to server for creating new record
var config = arguments[1] || {},
$elems = this,
errors = this.editable('validate'),
values, ajaxOptions; // added var ajaxOptions
if(typeof config.error !== 'function') {
config.error = function() {};
}
if($.isEmptyObject(errors)) {
values = this.editable('getValue');
if(config.data) {
$.extend(values, config.data);
}
ajaxOptions = $.extend({ //extending ajax options with config.ajaxOptions
url : config.url,
data : values,
type : 'POST',
dataType: 'json'
}, config.ajaxOptions);
$.ajax(ajaxOptions).success(function(response) { |
thanks, it is exactly what i need ! |
Hi,
First of all, I'd like to thank you for this great library.
I'd like to know if it is possible to let people use 'submit' with a 'PUT' verb (it seems like 'POST' is hardcoded). In fact, I want to update all my editable fields at once clicking on an 'update' button. Currently, I'm using your example for creating a new record but with the following url : /records/pk that I'd lijke to be associated with 'PUT'. Is it the right way to do it?
Thanks
The text was updated successfully, but these errors were encountered: