field().displayed()
Since: Editor 1.4
Determine if a field is shown in the editing form or not.
Please note - this property requires the Editor extension for DataTables.
Description
It can be useful to know if a field is displayed or not at some specific moments and this method provides that ability. This can be useful to determine if additional processing is required for a field (for example if it is shown, an update might be required).
This is the field specific equivalent of displayed() which can be used to determine the names of all of the fields are shown in the form.
Type
field(…).displayed()
Determine if the field is shown in the editing form.
Returns:
boolean: true if the field is shown, false otherwise.
Example
Trigger inline editing with a generic event handler and update the position field if shown.:
$('#myTable').on('click', 'td', function () {
editor.inline(this);
if (editor.field('position').displayed()) {
// Update list of position options
editor.field('position').update(/* ... */);
}
});