Forum Discussion
Need to be able to click on SharePoint list column to open form
- Nov 06, 2020
Rick Brock You can use below JSON to open the default form on click of person name:
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "button", "txtContent": "@currentField.title", "customRowAction": { "action": "defaultClick" }, "style": { "border": "none", "background-color": "inherit" } }Reference: button elements
Note: Using this JSON, you will loss the default hover action of person or group field (where you can see user details). Maybe adding some more JSON code you can achieve hover also. check above link for more information on column formatting.
Please click Mark as Best Response if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
Rick Brock You can use below JSON to open the default form on click of person name:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "button",
"txtContent": "@currentField.title",
"customRowAction": {
"action": "defaultClick"
},
"style": {
"border": "none",
"background-color": "inherit"
}
}
Reference: button elements
Note: Using this JSON, you will loss the default hover action of person or group field (where you can see user details). Maybe adding some more JSON code you can achieve hover also. check above link for more information on column formatting.
Please click Mark as Best Response if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
- ganeshsanapOct 14, 2022MVP
Awesome390 Are you trying to open list form on click of two separate columns? Title and another column? What is the column/data type of 2nd column?
Anyway, you can add above JSON code on any column and it should open the list form on click.
Note: You have to change the "txtContent" value based on column type. Single line of text, choice, number, etc. columns work with "@currentField".
Please consider giving a Like if my post helped you in any way.