Tooltip() Help
Posted by schuess - Jan 23 ’14 at 04:32
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
-
Dmitry KozlovAdminMember for: 10 years
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:
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.
-
schuessMemberMember for: 9 years 7 months 29 days
That seems really simple, but it did not work for me. The default tooltip text was not changed.
-
Dmitry KozlovAdminMember for: 10 years
[#2]: Please, send HTML-source of your form to [email protected]. Thank you.
-
SonomaMemberMember for: 8 years 11 months 28 days
[#3]: 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.
-
Dmitry KozlovAdminMember for: 10 years
[#4]: 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 [email protected].
-
AgneseBMemberMember for: 8 years 9 months 25 days
Hi,
with code:
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?
-
Dmitry KozlovAdminMember for: 10 years
[#6]: Hi,
Please, try the following code:
fd.field('InternalName').control()._el().find('input').attr('title', 'tooltip text')
-
AgneseBMemberMember for: 8 years 9 months 25 days
Unfortunately it doesn't work. For all fields as tooltips appears only field names. Is it possible to remove them?
-
Dmitry KozlovAdminMember for: 10 years
[#8]: Hi,
Do you want to remove the tooltips at all?
-
AgneseBMemberMember for: 8 years 9 months 25 days
I would preffer to change them but as I didn't succeed with that I would like to remove them at all.
Or at least change the default tooltip text from Field name to Title.