Tooltips for dropdown and user SP fields

Hi,
I'm working on tooltips for my SP form using this post.
It works for "Text" type of fields, but also I have "DropDown" and "User".
I guess that I have to use another parametr instead 'input' ? If so then which one?

Below is screenshot - code works well for all fields, except marked ones.

2020-02-19%2015_34_41-Window 2020-02-19%2015_34_24-Window

Hello @IgorT,

Welcome to Plumsail Community!

Yes, indeed, to change the tooltip for a drop-down field, you need to find another element, span. Please see the example below.

fd.spRendered(function() {
    var dropDown= $(fd.field('Choice').$el).find('span');
    $(dropDown).attr('title', 'Tooltip Text');
});

And for the PeoplePicker you need to find input element. Please see the code below.

fd.spRendered(function() {
    var peoplePicker= $(fd.field('PeoplePicker').$el).find('input');
    $(peoplePicker).attr('title', 'Tooltip Text');
});
1 Like

@mnikitina thanks for reply!

Works smooth with drop-down but doesn't work for Peoplepicker at all.

"Input" works for standard text fields (Type=Text) but this field hasType=User. So I assume that it's not an "input" and should be changed to something else?

Also can you suggest how it can be done for switchers (Type=Boolean)?

@mnikitina, morning is always better than evening :grinning:
Your code did the trick, thanks!

1 Like

Unfortunately drop-down code didn't work for me. Any alternatives?

Hello @MarkMando,

For drop down fields please use this code:

    var dropDown= $(fd.field('Choice').$el).find('span');
    $(dropDown).attr('title', 'Tooltip Text');

Please replace Choice with the internal name of the field.