Apr 28 2023 06:11 AM
I have a custom layout for a SharePoint list edit form where I only want 1 field to be editable and the rest to be displayed in a custom layout as information only. This was all working fine up until a couple of days ago and now the hidden fields are no longer displayed for some users (still works for me and doesn't matter whether the person is a Member or Owner of the site).
If I unhide a column it becomes visible in the form footer and also as an editable field which I don't want. Since there is no way in the definition of the body of the form to exclude fields then there is no way to show them without them being editable it seems. I can recreate the issue by clearing the browser storage and on the first view of the site I get the same behaviour as other users. If I then refresh the page it starts working as normal.
Looking at the network stack trace, when it isn't displaying the data - I can see the call to RenderExtendedListFormData the payload is:
{
"d": {
{"ListData":{"owshiddenversion":9,"ContentType":"Item","Title":"<Title>","Author":"<author_info>","Editor":...
when it renders correctly it is:
{
"d": {
"RenderExtendedListFormData": "{\"ListData\": {\"ID\": \"51\", \"DocIcon\": \"\", \"valuation\": \"unavailable (-)\", \"Editor\": [{\"Key\": \...
Seems like something that was working has been changed - I was sure that somewhere it was documented that you can still display contents of hidden fields in form customisations JSON using
=[$my_hidden_field]
syntax.
has this been changed?
If so, how are you meant to render columns in a form is a read only way with a custom layout?
Apr 28 2023 06:54 AM
@Scott_Mathieson I think there are some updates made by Microsoft for this SharePoint behavior.
Currently we are unable to use the hidden fields in SharePoint JSON formatting. I will suggest you to raise a support ticket with Microsoft and report this behavior. Follow: Get M365 support - online support
Here are some related threads:
Please click Mark as Best Response & Like 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.
For SharePoint/Power Platform blogs, visit: Ganesh Sanap Blogs