cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Cris2
Helper II
Helper II

Change tooltip text for 'Search' control for lookup modal

Hi

 

How can change the below tooltip (circled in red) using javascirpt.

 

Cris2_0-1636588645198.png

 

Thanks

Cris

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Cris2 

 

This code should work:

$(document).ready(function() {
    var list = $("#hs_mobilephonecountrycodeid_lookupmodal").find(".entity-lookup").find(".entity-grid").eq(0);
    list.on("loaded", function () {
        $("#hs_mobilephonecountrycodeid_lookupmodal .entity-lookup .modal-content .query.form-control").attr("data-original-title","Your tooltip");
		$("#hs_mobilephonecountrycodeid_lookupmodal .entity-lookup .modal-content .query.form-control").attr("title","Your tooltip");
		$("#hs_mobilephonecountrycodeid_lookupmodal .entity-lookup .modal-content .query.form-control").attr("aria-label","Your tooltip");
    });
});

View solution in original post

9 REPLIES 9
ragavanrajan
Super User
Super User

Hi @Cris2 

 

You don't need JavaScript to change the tooltip. Please try the below method 

 

In Portal management: 

1. Under content > lists > Choose your entity list

2. Unde General > Scroll down to "Search Section" > Update the tooltip text as you like 

ragavanrajan_1-1636593200845.png

3. Hit save and close 

 

In Portal Studio: 

1. Sync configuration > Browse website > Ctrl + F5 

 

Output: 

 

ragavanrajan_0-1636593182742.png

 

Hope it helps. 
------------

If you like this post, give it a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.

Hi @ragavanrajan 

There isn't a list item for this entity on our management portal. Created one, but not sure how to like with the page.

Thanks

Hi @Cris2 

 

Please add below JS code:

 $("#fieldlogicalname_lookupmodal .entity-lookup .modal-content .query.form-control").attr("data-original-title","Your tooltip");
    $("#fieldlogicalname_lookupmodal .entity-lookup .modal-content .query.form-control").attr("title","Your tooltip");
     $("#fieldlogicalname_lookupmodal .entity-lookup .modal-content .query.form-control").attr("aria-label","Your tooltip");

 

Please replace "fieldlogicalname" with your field logical name of lookup field.

 

--------------------------
If you like this post, give a Thumbs up. Where it solved your query, Mark as a Solution so it can help other people!

Hi @hardikv 

 

Tried this, but no luck.

 

Thanks

Hi @Cris2 

Please inspect the element and post the name of the control

hs_mobilephonecountrycodeid

hs_mobilephonecountrycodeid

Hi @Cris2 

 

This code should work:

$(document).ready(function() {
    var list = $("#hs_mobilephonecountrycodeid_lookupmodal").find(".entity-lookup").find(".entity-grid").eq(0);
    list.on("loaded", function () {
        $("#hs_mobilephonecountrycodeid_lookupmodal .entity-lookup .modal-content .query.form-control").attr("data-original-title","Your tooltip");
		$("#hs_mobilephonecountrycodeid_lookupmodal .entity-lookup .modal-content .query.form-control").attr("title","Your tooltip");
		$("#hs_mobilephonecountrycodeid_lookupmodal .entity-lookup .modal-content .query.form-control").attr("aria-label","Your tooltip");
    });
});

View solution in original post

Hi @hardikv 

 

Spot on! Thanks this worked.

 

C

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Users online (1,067)