SharePoint Custom List - Column Description to Tooltip

Matt-9236 201 Reputation points
2020-10-03T10:35:10.537+00:00

Hi,

I am looking to establish if there is a fairly simple means by which to display the text included in the 'description' field of a Custom List column as a tooltip on the New & Edit forms (rather than as a default line of text under the column).

I am building a list with reasonably detailed descriptions on a number of the columns. This text then takes up a considerable amount of space on the page and makes the forms look messy. If I can hide the text as a tooltip behind a button/icon next to the input field somehow it would be much cleaner and more user-friendly.

If anyone can help that will be great. Thanks in advance.

Thanks in advance.

Microsoft 365 and Office SharePoint Server For business
0 comments No comments
{count} votes

Accepted answer
  1. sadomovalex 3,636 Reputation points
    2020-10-08T15:30:00.553+00:00

    first of all add description to desired fields in your list (List settings > Fields > click on field > set Description > Save):
    31061-2020-10-08-18-23-48.png

    After that description will appear on list form - under field control:
    31071-2020-10-08-18-24-33.png

    Remaining step is to transform it from span element under field control to tooltip. This can be done by attaching custom javascript which will transform the DOM (e.g. using jQuery): hide span element with original description, attach mouseover event on above field control and show tooltip. Simplest way to attach custom javascript to Sharepoint site is to use UserCustomActions: Add custom javascript file to all pages in on-premise Sharepoint site collection without modifying masterpage. In this javascript you may check that location.href belongs to your list and execute code only for your single list.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Emily Du-MSFT 51,836 Reputation points Microsoft External Staff
    2020-10-05T06:54:41.477+00:00

    @Matt-9236
    You could use screen tip for custom list columns instead of custom list columns descriptions. Here’re steps.

    1.Click Customize in InfoPath in the list tab of ribbon.
    2.Right click the field -> Field property -> Advanced -> ScreenTip.
    30153-1.png

    Here're some references about how to display column description on hover by using code.

    Tooltip for column headers in SharePoint list
    Mouseover tooltips or callouts for SharePoint 2013 custom list
    Small description window on mouse hover on hyperlink


    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.


  2. Matt-9236 201 Reputation points
    2020-10-08T15:36:01.24+00:00

    Thanks sadomovalex

    I will give this a try.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.