Forum Discussion

Scott_Mathieson's avatar
Scott_Mathieson
Copper Contributor
Apr 28, 2023

Custom List Edit Form no longer allowing hidden fields to be displayed

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?

Resources