Nested / Two-Dimensional keys for Editor?

Nested / Two-Dimensional keys for Editor?

blcdhqblcdhq Posts: 5Questions: 3Answers: 0

I am using the trial version of Editor in order to figure out if I can use it for my project. The backend is custom, I am not using the PHP-Backend provided with Editor.

Out of the box, it can use a primary key (id) per row. But I need to also be able to send a key per column as well. I want to use inline editing (one cell at a time), and the data structure I want to send to the server has to look like this:

data[row_id][col_id] => value

But this doesn't seem possible as col_id can only be set to the column's title, a fixed value.

data[row_id]["Foo"] => "Bar"

Is there a way to accomplish this? Thank for any input!

Answers

  • allanallan Posts: 64,061Questions: 1Answers: 10,559 Site admin

    Hi,

    I'm afraid I'm not quite understanding - do you want to submit the value with a different name that the data property that contains the value in the DataTable? If so that can be achieved by using fields.data as well as the standard fields.name.

    Allan

  • blcdhqblcdhq Posts: 5Questions: 3Answers: 0

    Hi Allan,

    yes, that's what I wanted to achieve, and your comment brought me on the right path, I got it working. Thanks!

This discussion has been closed.