Editor form button to show/hide fieldInfo
Editor form button to show/hide fieldInfo
Loren Maxwell
Posts: 406Questions: 99Answers: 10
I remember seeing an example a few months ago of adding a custom button to an editor form that would toggle the visibility of the fieldInfo for all the fields (i.e., a "Help" button on the form that would show/hide the fieldInfo information).
I meant to bookmark it, but I cannot find it now even though I've been searching through the forums.
Does anyone know offhand where that example is?
This question has an accepted answers - jump to answer
Answers
Doesn't ring any bells for me I'm afraid. I'd guess that it used
fields()
to get all of the field names, then loop over that and usefield().node()
to get the container node for the field and finally manipulate the DOM (probably the display properly) for the field info elements.Allan
Thanks @allen, that might have been how they approach it.
I was thinking of using jQuery to hide fieldInfo (data-dte-e="msg-info") in the Editor form
open
event:and then add a button on the Editor form to make them visible again as a Help button.
I haven't programmed it yet, although I think it's simple enough, but I was hoping to see the other example first to see what their approach was.
@allen -- just wanted to follow up on this. I thought there was an example with a button to show/hide help on a form, but it was the
ctrl-h
combination in the example here:https://editor.datatables.net/reference/event/open
Ah! Thanks. I'd totally forgotten about that example.
Allan