I would like to place a custom button along with Create and edit buttons on teh form popup in the editor
This question has an accepted answers - jump to answer
Here is a custom button that is for an Editor that has three custom buttons inside
//custom button to download to start the ctr accouting interface editor $.fn.dataTable.ext.buttons.downloadCtrAcctInterface = { name: "downloadCtrAcctInterfaceButton", text: downloadCtrAcctInterfaceLabel, action: function ( e, dt, button, config ) { downloadCtrAcctInterfaceEditor .title(lang === 'de' ? 'FiBu-Schnittstelle anfordern' : 'Request accounting interface') .buttons( [ { label: lang === 'de' ? 'Schließen' : 'Close', className: 'closeButton', action: function () { var that = this; setTimeout(function() { that.close(); }, 100); } }, { label: lang === 'de' ? 'Test-Dateien herunterladen' : 'Download test files', className: 'testDataButton', action: function () { var that = this; setTimeout(function() { var prev = that; that.submit( function () { prev.create(); } ); }, 300); } }, { label: lang === 'de' ? 'Schnittstelle herunterladen' : 'Download interface', className: 'btn-showall-color interfaceDataButton', fn: function () { var that = this; setTimeout(function() { var prev = that; that.submit( function () { prev.create(); } ); }, 300); } } ] ) .create(); } };
To also have the "create" button in there you would need to add this to the buttons array aboove:
{ label: $.fn.dataTable.Editor.defaults.i18n.create.submit, fn: function () { this.submit(); } }
Thank you so much @rf1234
It looks like you're new here. If you want to get involved, click one of these buttons!
Answers
Here is a custom button that is for an Editor that has three custom buttons inside
To also have the "create" button in there you would need to add this to the buttons array aboove:
Thank you so much @rf1234