add() method stopped passing "id" value in POST request?

Hello all,

I have this list with form bound. I use the add method and the new id has its value set. Below I paste the (snipped) output from the console.log(form_values):

Object {
lname: “aaa”
fname: “sss”
sex: “M”
address: “”
group_id: “-1”
email: “”
id: 1454850984141
…}

The temporary ID is autogenerated client-side, as expected.

However, this value is not being sent to the server. I’ve checked with tcpdump and the POST request contains all variables except this one.

I’m using webix 3.1.2, fetched from your CDN (edge).

The result is I’m unable to push the correct ID from the server to the frontend.

I really have no idea what to do, especially it has worked before.

Hi,

Please look at the sample: http://docs.webix.com/samples/40_serverside/01_php_vanila/02_datatable_saving.html. You can check in the console that new item ID is returned from server as { "id":"", "status":"success", "newid":"0" } and it automatically replaces the auto-generated one.

Yes, but the new ID is not being applied to the new item.

Can you share the text of server-side response for data saving call. in your case.
It must be a valid JSON with new id value.

Ok, got it working.

I was trying to send back {id: null, status:‘success’, newid: 5}
instead of sending old id as empty string. Thanks both of you!