Editor: how to add a "Help Icon" for each field in a form?

Editor: how to add a "Help Icon" for each field in a form?

almircamposalmircampos Posts: 13Questions: 5Answers: 0
edited July 2015 in Free community support

Dears,

I'm in the trial period and wasn't able to find a simple way to add a "help icon" for each field on the form. Something like:

<Label>: <input> <icon>

My goal is to click on the icon and get some help about the field.

Actually, on this link https://editor.datatables.net/reference/api/message()# there is an explanation about how to show a message if you have the help icon. However, my problem is that I don't know how to add the icon.

Any clues?

Thanks in advance.

Almir Campos

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,439Questions: 1Answers: 10,053 Site admin
    Answer ✓

    Hi Almir,

    What you could do is use the fields.fieldInfo option - it doesn't need to be plain text, you can use HTML - so for example:

    {
      name: 'myField',
      fieldInfo: '<img src="/images/helpIcon.png" title="This is an input field" />'
    }
    

    You could potentially use CSS to then position the icon as you wish if the default doesn't suit your needs. The DOM structure that Editor uses is documented here.

    Allan

  • almircamposalmircampos Posts: 13Questions: 5Answers: 0

    It worked great. Thank you!

This discussion has been closed.