Field Tool Tip Feature
Field Tool Tip Feature
Just getting started with Editor for DataTables and wondering if there is a way to include "Tool Tip" like feature on each of the fields in an editor instance in order to define the nature of the field and any possible constraints.
I would like this field "help" to be included within the editor instance.
Thanks in advance...
I would like this field "help" to be included within the editor instance.
Thanks in advance...
This discussion has been closed.
Replies
There are a couple of options. The first is to use the `node` method to get the elements which Editor uses for a particular field ( http://editor.datatables.net/api/#node ). You could use this to add an attribute to the `label` tag - for example:
[code]
$('label', editor.node('myField')).attr( 'title', "Tooltip text" );
[/code]
If you want something more complex, but still tooltip based, you could then run a tooltip library over that new title attribute (i.e. rathe than using the browser's built in tooltips - which can be a bit ugly!).
The final option is to create a new field input type with completely custom HTML. That method is described here: https://editor.datatables.net/tutorials/field_types
Regards,
Allan