0

I'm trying to add line breaks within the different sections of JSON formatting for my SharePoint list. Right now, I have sections each with specific fields, however those fields need to have line breaks after certain ones (almost like "sub-sections.").

Is it possible to accomplish this by nesting children div elements within sections that have corresponding fields within each?

Here is the code I currently have that results in line breaks, with generic section and field names used for ease of reference:

{
    "sections": [
        {
            "displayname": "",
            "fields": [
                "Title",
                "Field 2"
            ]
        },
        {
            "displayname": "Section 1",
            "fields": [
                "Field 3"
            ]
        },
        {
            "displayname": "Section 2",
            "fields": [
                "Field 4",
                "Field 5"
            ]
        }
    ]
}

1 Answer 1

0

Unfortunately, adding line breaks or sub-sections is not possible using SharePoint JSON form formatting capabilities in body section.

Unlike the header and the footer, body configuration only allows defining one or more sections and adding one or more columns into each of those sections.

Body configuration does not support advance JSON customizations like header/footer (or column/view formatting in list views). So, you cannot achieve your requirements using SharePoint JSON form formatting - body layout. You can find more details & limitations in below Microsoft official documentation:

Microsoft official documentation: Configure custom body with one or more sections

1
  • 1
    Thank you for the info! This is really helpful and I can figure out a work-around.
    – Matt Born
    Commented Jul 31, 2023 at 14:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.