I am trying to extend the remove button and change the action value using mode but the data being submitted to the server is empty.
{
extend: "remove",
editor: editor,
text: "Publish",
action: function ( e, dt, node, config ) {
editor.remove(dt.rows({selected: true}).indexes())
.title('Publish posts')
.buttons('Confirm Publish')
.message('Publish selected posts.')
.mode('publish')
}
}
There is a related issue but it does not work for me.
The expected server data I need is something like:
action: publish
data[0][id]: 1
data[0][etc]: etc
But the actual data being sent is:
action: publish
Or is there anyway that we can edit the data being sent to the server before submitting? Tried preSubmit
event but does not work.
Thanks in advance!