Forum Discussion
Dave Walker
Aug 15, 2022Copper Contributor
Column formatting coupled to display form
Hi there, I have what should be a simple problem to resolve. I have a user that is applying custom formatting to a list column using JSON. He is simply applying an width and height to a to a multi-line text field. This issue is that this formatting shows up on the list item display form when he just wants it to occur only for the list view. It seems like the column formatting is coupled to both the list view and the display form. Is there a way to have the column formatting only apply to the list view?
For example, here is some column formatting JSON that sets the height of a colume to 500px.
{
"elmType": "div",
"txtContent": "@currentField",
"style": {
"height": "500px"
}
}
You can see that the formatting is reflected in the list view:
... but it also formatted in the display form:
We would like the custom formatting to only show in the list view.Preview
Thanks in advance,
Dave
According to my knowledge there is no way to do different column formatting based on List View and List Form.You can create Field Customizer Using SPFX which will render only for list view.
Reference Link:
Hope it will helpful to you and if so then please like this answer and mark this as best answer to help other people as well.
- kalpeshvaghelaSteel Contributor
According to my knowledge there is no way to do different column formatting based on List View and List Form.You can create Field Customizer Using SPFX which will render only for list view.
Reference Link:
Hope it will helpful to you and if so then please like this answer and mark this as best answer to help other people as well.