Tooltip() Help

Discussions about Forms Designer for SharePoint 2010.
User avatar
schuess
Posts: 82
Joined: Wed Jan 22, 2014

23 Jan 2014

I am not following how to modify the tooltips without modifying the field title. i was hoping to also do some additional styling of the tooltips like noted at http://jqueryui.com/tooltip/

can you give some specific instruction on how to add a tooltip?


thanks

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

24 Jan 2014

You can add title attribute to titles of your fields with JavaScript. The value of this attribute is displayed in tooltip of the appropriate element in most browsers. Here is the code:

Code: Select all

fd.field('InternalName').title()._el().attr('title', 'tooltip text') 
Please, replace InternalName with the internal name of your field. You can also include jquery-ui library with tooltip plugin into master-page and use it in your forms.

User avatar
schuess
Posts: 82
Joined: Wed Jan 22, 2014

24 Jan 2014

That seems really simple, but it did not work for me. The default tooltip text was not changed.

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

27 Jan 2014

Please, send HTML-source of your form to support@spform.com. Thank you.

Sonoma
Posts: 88
Joined: Wed Oct 15, 2014

25 Sep 2014

Hi. What was the fix for this.

I too have several fields that I would like this to work on but I am not having any luck.

Two of my fields are 'IMMDD' and 'DOI'.

fd.field('IMMDD').title()._el().attr('title', 'MM/DD/YYYY');
fd.field('DOI').title()._el().attr('title', 'MM/DD/YYYY');

I do not have any errors in the console log.


Thank you.

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

26 Sep 2014

Hi,

The solution from my first comment works well. Please, make sure you use the correct internal names of the fields. If it still doesn't work, please, drop HTML-source of the form page to support@spform.com.

AgneseB
Posts: 14
Joined: Tue Dec 16, 2014

27 Nov 2014

Hi,

with code:

Code: Select all

fd.field('InternalName').title()._el().attr('title', 'tooltip text') 
I can see the tooltip text only when moving mouse on field label. How to add it to the input field?

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

27 Nov 2014

Hi,

Please, try the following code:

Code: Select all

fd.field('InternalName').control()._el().find('input').attr('title', 'tooltip text')

AgneseB
Posts: 14
Joined: Tue Dec 16, 2014

03 Dec 2014

Unfortunately it doesn't work. For all fields as tooltips appears only field names. Is it possible to remove them?

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

04 Dec 2014

Hi,

Do you want to remove the tooltips at all?

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests