Skip to content

SharePoint list form JSON: "enabled": false / "readOnly": true - does not make field read-only (field still editable) #10827

@tomaszholisz-dev

Description

@tomaszholisz-dev

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

Declarative list formatting

Developer environment

None

What browser(s) / client(s) have you tested

  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)

Additional environment details

No response

Describe the bug / error

Hi,
I am experiencing an issue with SharePoint list form customization using JSON. A field configured as disabled ("enabled": false / "readOnly": true) is still editable in the form UI.

Environment:
SharePoint Online
List form customization using JSON (Configure layout)
Standard SharePoint form (no SPFx extension)

Problem description:
I am trying to make the field CzynnoscRW read-only (disabled) using fieldSettings. However, despite setting "enabled": false / "readOnly": true, the field remains editable in the form.

JSON configuration used:
{
"sections": [
{
"displayname": "Szczegóły zadania",
"fields": [
"SzczegolyZadania",
"Miejsce",
"MiejsceKomasacja",
"MiejsceZwrot",
"Czynnosc",
"CzynnoscRW",
"CzynnoscWydanie",
"Dok"
]
},
{
"sections": [{}],
"fieldSettings": [
{
"name": "CzynnoscRW",
"enabled": false
}
]
}
]
}

Steps to reproduce

Open SharePoint list
Go to Configure layout → Body
Apply the above JSON
Open item form (New/Edit)
Try to edit CzynnoscRW

Expected behavior

Expected behavior:
The field CzynnoscRW should be disabled (read-only) and not editable.

Actual behavior:
The field is still editable.

Metadata

Metadata

Assignees

Labels

Needs: Author FeedbackAwaiting response from the original poster of the issue. Marked as stale if no activity for 7 days.area:list-formattingCategory: View, row & column formatting with JSONsharepoint-developer-supportsharepoint-developer-supporttype:bug-confirmedConfirmed bug, not working as designed / expected.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions