Forum Discussion

Rosalia Dias's avatar
Rosalia Dias
Brass Contributor
Jul 30, 2021

SharePoint List Form Configure Layout - Body Not Working

Hi

I am formatting a SharePoint List Form following the Microsoft documentation Configure the list form | Microsoft Docs

Both the Form Header & Footer work well. However the Body does not! :sad:  It simply won't show when "Preview" is pressed and I get no errors on my JSON (copied below). I have tried to create more sections with less fields, but still - simply nothing happens! No error message nothing, when I click "Preview".

If I click "Save" it simply closes the form and when I open it again the JSON is gone. 

 

Can someone help?

I want to avoid creating a new form using PowerApps Integration as the changes we want are quite simple!

 

{

    "sections": [

        {

            "displayname": "Role",

            "fields": [

                "Resource Role"

            ]

        },

        {

            "displayname": "Details",

            "fields": [

                "Months",

                "Min Rate",

                "Max Rate",

                "Line Manager",

                "Project",

                "Geography",

                "Charge To"

            ]

        },

        {

            "displayname": "Contract",

            "fields": [

                "Contract Terms to Add"

            ]

        }

    ]

}

  • KevinBryan Rosalia Dias 

     

    I have observed this behavior as well on my SharePoint site. Try below things after "saving" the JSON in body section:

    • Refresh the page (hard refresh: Ctrl + F5 in windows)
    • Clear browser cache

    It worked for me after hard refresh and I also think that this is a temporary issue from Microsoft side (maybe because of latest updates in SharePoint online).


    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.

  • KevinBryan's avatar
    KevinBryan
    Copper Contributor
    I am seeing the exact same thing - I have customized forms on other sites with no issue but it's now showing up where the body, header and footer all just disappear on any new sites.
    • Rosalia Dias's avatar
      Rosalia Dias
      Brass Contributor
      Hi, it seems to be, for me anyway a temporary issue, or worse an unstable one from Microsoft 😞 ! With the code above it is now working (for a few days with no issues), with absolutely nothing done from my end ... a mystery!
      • KevinBryan's avatar
        KevinBryan
        Copper Contributor
        Thanks for the update, I'll just keep trying and hope it's a transitory issue..
  • JHS2020's avatar
    JHS2020
    Copper Contributor
    Anybody who found a solution as I am experiencing the exact same problem 😕
      • Dev88's avatar
        Dev88
        Copper Contributor
        Same issue here, it seems like SharePoint is adding an invalid JSON once you start rearranging the columns.
  • Blue_Brumie's avatar
    Blue_Brumie
    Brass Contributor
    I have been experiencing this issue for a couple of days after everything working fine for two weeks on multiple lists so not sure what changed. A hard refresh of the page would bring it back but would disappear again on the next try.

    I have solved this by turning off the sync for the list in List Settings > Advanced Settings > Set Offline client availability to No.

    Obviously not ideal if that's the functionality you required but currently not required for my needs.

    Hope this helps others and I'd be interested to know if it works for anyone else?
    • pdfrig's avatar
      pdfrig
      Brass Contributor

      Didn't realize there was a thread on this already, started a new one few weeks ago.  

      Blue_Brumie - Turning off the sync from list settings worked for me too. 
      I've been working with MS Support on multiple issues and the fix they recommended, disabling the sync - Lists sync policies - SharePoint in Microsoft 365 | Microsoft Docs, also fixed other issues we've been having so far.  After adding DisableNucleusSync, dword:1 as stated in the document, the formatting now sticks for all the lists I was having issues with.  We will be testing with more users this week.  It will need to get pushed out however to all the users once tested.  

    • Mark_Cosgrove's avatar
      Mark_Cosgrove
      Copper Contributor

      YES, thank you so much for this! Tried different browsers, clearing the cache, etc. Sometimes the formatting would come back, but more often than not I was just wasting my time and nothing would change. Disabling offline availability fixed it immediately, so I'm curious to see if it stays that way now, or if I'll need to toggle it periodically. Either way, this is likely gonna save me a tonne of time!

  • luciusgwee's avatar
    luciusgwee
    Copper Contributor

    It is not working on subsites or teamsites. The format just crashes when an item is selected and the "Edit all" button is pressed.

  • purna429's avatar
    purna429
    Copper Contributor

    Seems its still an issue. By clearing browser cache and hitting F5 it started working. But the list items which were opened in the past seems having some cache and they are not considering the formatting.

    Hope this will be resolved soon.

     

  • BennoS's avatar
    BennoS
    Copper Contributor
    Seeing same problem but only on a particular list. Just wont save the JSOn whatever I do. Go to several other lists and apply formatting and works ok. Cam back to this one and still wont save. Please post up any further info if you guys fix it
    • Klutzu2's avatar
      Klutzu2
      Copper Contributor
      I've done some testing on this. The first SharePoint List that I tried adding JSON to was a list "created from an existing list." This is the list that was problematic for me with the JSON. I had one of my SCAs recreate the list using ShareGate instead. Now I am able to configure the form with JSON as aspect.
      • BennoS's avatar
        BennoS
        Copper Contributor

        Klutzu2 BRUuuuh! this worked. I forgot I even created this one from another list but must have been.

        Thankyou for your service.

  • Seeing the same issue today. Added header and body JSON, saved, all is fine. Went back later and changed the conditional rule for one field. It then stripped out all of the returns in my body JSON and also removed the Attachments field from a section and gave me the invalid JSON error. Once I added in all the returns again and re-added the Attachments field, it saved fine. But then I modified the column again and it stripped things out again. Very frustrating and a complete waste of time to have to keep fixing this.
    • UnsuckM365's avatar
      UnsuckM365
      Copper Contributor
      This is still happening. I tried for hours today and the code magically disappears the minute I save the page.
  • reub77's avatar
    reub77
    Copper Contributor

    Rosalia Dias I've been experiencing this issue a lot lately and it's never clear why. Some sites run fine with even higher complexity. I think the forms just get corrupt occasionally.

     

    I have found a fix and I like it a lot. I was using a list with the content types not being editable.

    1. Go to a different site (anything other than the where the problem list is)
    2. I went to my sandbox site and clicked to create a new list (the new modern way)
    3. Then choose from Existing List
    4. Select the problem list
    5. Apply your fixes to the newly created/copied list (It worked perfectly in my sandbox)
    6. Return to problem list to delete it.
    7. Then go to the same List creation method in the problem list site, and choose the newly fixed list and created it.

    So far its been working perfectly. I have tried so many methods. No content will be included so you may have to back it up so that you can add it back.

  • franscollet's avatar
    franscollet
    Copper Contributor
    Hello,
    I think I found the issue on my side. As the formatting is applied by content types and if the content types are in read-only mode, you can not apply formatting. I switched the content type in edit mode and then I was able to apply the formatting.

Resources