DataTable.Editor.Field
Editor field instance.
Please note - this property requires the Editor extension for DataTables.
Description
Each field in an Editor form is represented by an DataTable.Editor.Field object instance. The objects are created automatically when using the fields initialisation option or the add() API method. You would not construct a new field instance yourself (it is possible, but it wouldn't serve any purpose since it wouldn't be attached to an Editor form to be used with!).
Fields are initialised using the field-options data type and have an extensive API available through the field() method.
Using the field data type API
var editor = new $.fn.dataTable.Editor( {
ajax: '../php/staff.php',
table: '#myTable',
fields: [
{
label: 'Name:',
name: 'name'
}
]
} );
var name = editor.field('name');
name
.def( 'Allan' )
.message( 'Enter user name for the account to update' );