Why X-editable does not send AJAX request to send the modified data?
Asked Answered
G

1

6

I embedded the x-editable:

in the html:

<a class='doc_title editable' id='doc_title_12345' data-name="doc[title]" data-title="Enter doc title" data-type="text" data-url='/docs/12345' href='#doc_title_12345'>My Document<a>

in the js:

// turn to inline mode
$.fn.editable.defaults.mode = 'inline';

// turn on editable on title
$('.doc_title.editable').editable();

I can edit in browser, but when I click on save nothing happens (I mean I see the new value, but it does not send via AJAX request to the server)

What could be wrong?

Gropius answered 18/12, 2013 at 14:48 Comment(0)
G
9

As here mentioned it is required to add the always parameter:

$('.username').editable({
    send: 'always'
});

I didn't find it in the documentation (in the Getting started)

Gropius answered 18/12, 2013 at 14:57 Comment(1)
more specifically, the docs say this: Strategy for sending data on server. Can be auto|always|never. When 'auto' data will be sent on server only if pk and url defined, otherwise new value will be stored locally.Convex

© 2022 - 2024 — McMap. All rights reserved.