Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 81909

Extend remove button and change mode to rename the action.

$
0
0

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!


Viewing all articles
Browse latest Browse all 81909

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>