Accessing POST values

Accessing POST values

arichardsonarichardson Posts: 16Questions: 3Answers: 0

Is there anyway for an Editor POST to just use the column name as the value "MY_TITLE" instead of the format of "data[undefined][MY_TITLE]"?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Answer ✓

    Hi,

    You can use legacyAjax to force Editor to use a format that will result in data[MY_TITLE] - but that doesn't allow multi-row editing.

    Alternatively, you can use ajax.data or preSubmit to modify the data structure that is being sent to the server.

    One thing that is important to mention here, the fact that you have undefined should be an issue - that should the the row's id, and if Editor can't tell the server what row to change the values of, you could end up with data corruption (in the worst case) or nothing happening (in the best).

    If you are not using the DT_RowId property to tell DataTables/Editor what the row id is, you need to use idSrc in Editor to tell it where to get the row id.

    Regards,
    Allan

This discussion has been closed.