formOptions
Form configuration options for the editing types Editor offers.
Please note - this property requires the Editor extension for DataTables.
Description
Editor provides a number of styling and behavioural options for the forms it displays,through the form-options object. The main editing methods provide the ability to set these options when calling the API methods, but it can also be useful (particularly if you are using the provided Buttons buttons) to specify default options that will be applied when those methods are called.
Editor has three editing modes:
As each editing mode provides a significantly different interface for the end user to operate, this configuration object provides the ability to configure the form options for each individually. This is done through three object parameters:
formOptions.main- Main editorformOptions.bubble- Bubble editorformOptions.inline- Inline editor
For full details of the form options available, please refer to the form-options object's documentation.
Type
This option can be given in the following type(s):
Example
Set options for the main and bubble editors. No specific options set for the inline editor.:
var editor = new DataTable.Editor({
ajax: 'php/staff.php',
table: '#myTable',
formOptions: {
main: {
closeOnBackground: false
},
bubble: {
title: true,
closeOnBackground: false
}
}
});