preOpen
Form open (displayed) event - Triggered before the form is displayed (cancellable).
Please note - this property requires the Editor extension for DataTables.
Description
Before a form is displayed, this event is fired. It allows the open action to be cancelled by returning false from the function.
This event is cancellable by returning false from the event handler, which will block any further action from happening (i.e. actually displaying the form), leaving the form in its existing state.
Event naming / backwards compatibility note
Prior to Editor 1.3, events were prefixed with the string on and this event was called onPreOpen. That event name can still be used, and will function exactly the same way as the event documented here. The new name is used for simplicity and coherence with the event naming conventions in DataTables.
Type
function( e, method, mode )
Parameters:
| Name | Type | Optional | |
|---|---|---|---|
| 1 | e | No | |
Event object | |||
| 2 | method | No | |
Since 1.5: The form display type. This will be one of:
| |||
| 3 | mode | No | |
Since 1.5: The editing action being preformed. This will be one of:
| |||
Returns:
boolean:
Return false to stop the open from happening.
Related
The following options are directly related and may also be useful in your application development.