Multiple Inserts with editor without closing the form
Multiple Inserts with editor without closing the form
Allan,
my customer would like to have the possibility to insert multiple rows keeping the Editor form open.
In practice, with the form open he would like to have to confirm buttons, one for add and close, the other add and prepare the form for a new insert. Do you think it is possible ?
I navigated the API but i did not find any clue about this possibility
Thanks
Luca
This discussion has been closed.
Answers
Hi Luca,
What you can do is to use the
onComplete
option to have the default action once the form has been submitted set tonone
- [see the reference](https://editor.datatables.net/reference/type/form-options#onComplete---action-to-occur-after-Ajax-update0. UseformOptions.main
to set it.Then use
buttons()
(or thebuttons
object of theform-options
object) to have both the close button (which would callclose()
) and the submit button (which would callsubmit()
and thencreate()
in the callback once the submit is complete).Regards,
Allan