The CreatorCon Call for Content is officially open! Get started here.

How to add hint dynamically to the label.

hsingh
Mega Contributor

I have a fiels label Description but I created a client script to change label to Business Justification. Is there a way to add the help icon dynamically to the client script?

1 ACCEPTED SOLUTION

its done by   inserting next to link.change_request.description :



$(linkLabelName).insert({


                after: '<a id="add_me_macro" href="kb_view.do?sysparm_article=KB0011022"><img src="images/icons/help.gifx" title="Add me" alt="Click on the icon for help" target="_blank"></img></a>  (click icon for help)'


          });


View solution in original post

8 REPLIES 8

hsingh
Mega Contributor

It adds the icon but after the field textbox.   I want to add it just after the label and there is a javascript running on the label itself which does not allow the link to get activated.



Hi Harjnder,



Plz see the attached screen shot and marked answer, I think you will get the way how to do in client scriptUntitled.png



thanks,


Pavan


its done by   inserting next to link.change_request.description :



$(linkLabelName).insert({


                after: '<a id="add_me_macro" href="kb_view.do?sysparm_article=KB0011022"><img src="images/icons/help.gifx" title="Add me" alt="Click on the icon for help" target="_blank"></img></a>  (click icon for help)'


          });


Roger11
Giga Guru

Please vote for this idea to get it added as currently there is no ServiceNow supported method to dynamically modify hints on fields.

https://community.servicenow.com/community?id=view_idea&sysparm_idea_id=ffbf4b5b1b908910c16b43f6fe4bcbb6&sysparm_idea_table=x_snc_com_ideation_idea&sysparm_module_id=enhancement_requests