'SharePoint Column Formatting - Preventing customisation within the new/edit forms?
I have been using column formatting a lot within SharePoint recently, it's great at producing good visuals that get the users engaged. One thing that is a bit of a pain is the formatting on a column influences the new/edit form. For example I have a Choice column in SharePoint that has a number of values in it. Using column formatting I am changing these values into icons so users can quickly see the icon and the bonuse is the icon takes up less space than the full text.
The issue is this code also replaces the choices within the new/edit form, which isn't so intuitive for the users because they may not know what icon they are looking for. So instead of a list of choices (multi-select) they get this:
The code I am using is:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"style": {
"font-size": "16px",
"display": "flex",
"flex-wrap": "wrap"
},
"children": [
{
"elmType": "span",
"attributes": {
"title": "Reports",
"iconName": "Financial",
"class": "='ms-fontColor-' + if(indexOf(join(@currentField,''),'Reports') != -1, 'themeDark', 'neutralLight')"
},
"style": {
"padding": "3px 3px 3px 3px"
}
}
....
}
]
}
Is there a way to stop the column formatting influencing the new/edit forms?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

