1

I have a SharePoint list which has a Title column and a Description. The Description column is a multi-line text field.

I would like to not display the Description column and instead show the relevant Description when moving the cursor over the Title field.

I've found JSON code to display a card or image when hovering over a field but I'm not sure how to do something similar with just a string of text.

I'm guessing it's fairly easy for someone who knows what they are doing!

1 Answer 1

3

You can try this and customize to suit your need

{
  "elmType": "div",
  "style": {
    "font-size": "12px"
  },
  "txtContent": "@currentField",
  "customCardProps": {
    "formatter": {
      "elmType": "div",
      "txtContent": "[$Description]",
      "style": {
        "font-size": "12px",
        "color": "green",
        "padding": "5px"
      }
    },
    "openOnEvent": "hover",
    "directionalHint": "bottomCenter",
    "isBeakVisible": true,
    "beakStyle": {
      "backgroundColor": "white"
    }
  }
}

enter image description here

3
  • That's exactly what I was looking for. Thanks you!
    – steve
    Commented Oct 16, 2020 at 18:51
  • If this answered your question, please mark the question as answered Commented Oct 16, 2020 at 19:11
  • @MatiurRahman. a similar question, If you can help there, that would b emuch appreciated. sharepoint.stackexchange.com/questions/287335/… Commented Nov 28, 2020 at 18:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.