Start of the submit process, allowing changes to be made to the form.
Please note - this property requires the Editor extension for DataTables.
The full Editor reference documentation is available to registered users of Editor - the information shown below is a summary only. If you already have an Editor license please sign-in, alternatively an Editor license can be purchased on this site, or sign up for the free trial.
It can be useful at times to be able to modify a form's values immediately prior to the data being submitted to the server. The
preSubmit option provides access to the raw data to be submitted to the server, but it is triggered after the data has been read from the form, so any changes to the data in the form won't be reflected in the data.
initSubmit event fills that gap, being triggered immediately before the data is read from the form, and giving the option of modifying the form.
This event is cancellable - i.e. you can return
false from the callback function to stop the form from being submitted. This can be useful if you want to use local confirmation or validation.