Share via

Lists Form Edit not Saving JSON

Anonymous
2022-01-03T20:49:08+00:00

I'm trying to edit a form in Lists using JSON in the header. Here is the initial code:

{

"debugMode": false, 

"elmType": "div", 

"attributes": { 

    "class": "ms-bgColor-neutralLighter ms-fontSize-32 ms-fontWeight-semibold" 

}, 

"style": { 

    "padding": "10px" 

}, 

"txtContent": "New Special Order" 

}

The above code works fine but if I change anything - example change "txtContent": "New Special Order" to "txtContent": "New Order", the code is not saved. If I press preview, it looks right. I then press "Save" and close the form. The next time I open the form, the original code is back.

I've also tried adding code the body section but it won't preview or save.

Microsoft 365 and Office | SharePoint | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2022-01-06T22:04:42+00:00

I finally got it to work. After editing the JSON code in the header, I pressed the save button. Then, before closing the form, I press "F5" (refresh), the form closed on its own and the code was saved.

Was this answer helpful?

0 comments No comments

11 additional answers

Sort by: Most helpful
  1. Anonymous
    2022-01-04T03:28:51+00:00

    Thank you. I'm the only one in my organization that programs. I own an electrical contracting business and develop software after hours

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2022-01-04T03:03:33+00:00

    Hi JerryBumgarner1,

    Thanks for sharing updates with us and I really appreciate your effort and your precious time doing those tests. First, please accept my apologize you meet such an issue and I understand it effort on your daily work.

    We appreciate your understanding that sometimes the initial suggestions may not resolve the problem very soon. However, we can work together to narrow down and resolve the situation

     As per your screenshot you are using Microsoft List app and when you add new item in Microsoft List the JSON code change to back original under "Header" layout section and when you code into "Body" section it also not save. May I know if my understand is correct?

    I just did a test and it seem I have on issue as like you described above. Here are my image for your reference:

    To move further if this issue related with your organization tenant level, I request you please don't mind and could you please confirm does other users in your organization meet same the behavior as like you encounter.

    I appreciate your understanding and stay safe!!

    Best Regards

    Waqas Muhammad

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2022-01-04T02:02:54+00:00

    I'm using the Microsoft Lists desktop application. I tried the code again on another list form and it is not working there either. When I press "Preview", it appears to work. I then press "Save", then close the form with the "X" in the upper right corner. There is always another form behind that one that is not showing the correct code so I "X" it out also. Also, the same thing happens if I paste code into the "Body" section (Different code but it doesn't save it. Preview works, but the code is not saved)

    PII is mask by MSFT

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2022-01-04T00:12:03+00:00

    Hi JerryBumgarner1,

    As per your description, please don’t worry we can work together to narrow down and resolve the situation.

    It seems your above mentioned JSON code work in SharePoint online list but when you try to change "txtContent" from "New Special Order" to "New Order" and the code is not saved in your list. May I know if my understand is correct? If yes, based on my test result it seems I cannot meet the same issue as like you described above (After save the JSON code and it doesn’t revert back to original code).

    To narrow down your issue, could you please confirm does this issue only occur to specific SharePoint online list. If you don’t mind, could you please try this JSON code into another SharePoint online list and check if there is any different, it will help for us to narrow down your issue whether issue related with specific list or JSON code.

    In the meanwhile, if you don't mind could you please upload a screenshot for our reference so we can understand your exact situation and provide our suggestion in a productive manner, perhaps some related screenshots will be helpful.

    I appreciate your understanding and stay safe!!

    Best regards

    Waqas Muhammad

    Was this answer helpful?

    0 comments No comments