0

Currently my Title column has a link in it, but I need to make it bigger and change the font while keeping the href function (after clicking on the title it opens editing).

When I use "elmType": "a", the text disappears.

I found following script, but it does not work:

{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column- 
formatting.schema.json",
"elmType": "a",
"txtContent": "@currentField.desc",
"style": {
  "font-size": "13pt"
},
"attributes": {
  "href": "@currentField"
}
}

Anyone got a hint? Thank you.

1 Answer 1

1

You can use the below JSON to update the Title field.

Updated the JSON to open Edit Form on Title column value click.

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "button",
  "customRowAction": {
    "action": "editProps"
  },
  "style": {
    "border": "none",
    "background-color": "transparent",
    "font-size": "13pt",
    "text-decoration":"underline"
  },
  "txtContent": "@currentField"
}

Other References:

  1. Column formatting to customize SharePoint
  2. Samples on GitHub
  3. Open Edit Form using JSON Formatting

enter image description here

5
  • After I use this JSON, the text disappears. There is not exactly https link, but after clicking the title, there is a dialogue window with editing the item.
    – Martin Dub
    Jul 7, 2021 at 11:54
  • 1
    So, on the click on Title column value you want to open Edit Form? Jul 7, 2021 at 11:56
  • Yes. When I click on Title, I should be able to edit all values in an item.
    – Martin Dub
    Jul 7, 2021 at 12:00
  • @MartinOak check the updated answer. It opens the Edit item pane when user click on the title Jul 7, 2021 at 12:02
  • 1
    Thats it! Thank you so much.
    – Martin Dub
    Jul 7, 2021 at 12:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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