SharePoint 2013 Custom List - hide automated tooltips on New/Edit forms

Matt-9236 201 Reputation points
2020-10-15T10:01:17.75+00:00

Hi,

I am currently using the following snippet to remove the automated tooltips that appear when a user hovers over any input box on custom list new & edit forms. Unless I'm missing something, these tooltips serve no real purpose - they simply display the field name of the column, which the user can already see a few inches away on the page:

$(document).ready(function() {
        $("tr td[class='ms-formbody'] span [title!='']").attr
        ('title', '');
   });

The snippet works well in removing the tooltips. However, I'm currently working on a list that includes dynamic columns which are shown and hidden based on the option selected in a 'parent' choice column. As the title of each 'child' column is being used to drive the dynamism, I obviously can't use the snippet to remove the tooltips in this case.

Does anyone know of a way that I can potentially target the tooltip elements and make them transparent using CSS? I'm not an experienced coder by any means, but I figured this may be a way to hide the tooltips whilst still allowing my dynamic fields to show/hide as required?

Thanks

SharePoint Server Management
SharePoint Server Management
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Management: The act or process of organizing, handling, directing or controlling something.
2,870 questions
0 comments No comments
{count} votes

Accepted answer
  1. MichaelHan-MSFT 18,021 Reputation points
    2020-10-16T03:16:14.733+00:00

    Hi @Matt-9236 ,

    As a workaround, you could use SPUtility.js to show/hide dynamic columns based on a 'parent' choice column. This doesn't need to use the title of 'child' columns.

    https://archive.codeplex.com/?p=sputility

    Below is my demo code to show/hide the column based on the choice column:

         $(document).ready(function ()   
        { // Get a the choice field   
        var choiceField = SPUtility.GetSPField('Choice');  
        // Hide the target fields in form load  
        SPUtility.GetSPField('col1').Hide();  
        // create a function to show or hide a field based on the selected choice Field value   
        var ShowHideField = function() {   
        var selectedFieldValue = choiceField.GetValue();   
        // Hide the 'col1' field if the selected value is 'A'   
        if(selectedFieldValue = 'A') {   
        SPUtility.GetSPField('col1').Hide(); }   
        else { SPUtility.GetSPField('col1').Show(); } };   
        // attach the function to choice field   
        $(choiceField.Dropdown).on('change', ShowHideField);  
     });   
        
    

    Test result:

    32748-bing.gif


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful