SharePoint List Form Formatting

SharePoint list form formatting is a powerful feature that allows users to customize the appearance and behavior of list forms in SharePoint. With the right techniques, you can enhance the user experience, improve data accuracy, and streamline workflows. Let's delve into the world of SharePoint list form formatting and explore its capabilities.

Display SharePoint List Items in a SPFX Web Part [Tabular Format]
Display SharePoint List Items in a SPFX Web Part [Tabular Format]

SharePoint list forms are the interfaces where users interact with data stored in SharePoint lists. By default, SharePoint provides basic forms, but with form formatting, you can transform these plain forms into engaging and intuitive experiences. In this article, we'll guide you through the process of formatting SharePoint list forms, from basic customizations to advanced techniques.

Customizing SharePoint List Forms in InfoPath 2010
Customizing SharePoint List Forms in InfoPath 2010

Understanding SharePoint List Form Zones

Before diving into formatting, it's crucial to understand the different zones in a SharePoint list form. These zones are the building blocks that allow you to apply specific formatting and functionality to various parts of the form.

SharePoint List Form Formatting with JSON & flow approvals (2)
SharePoint List Form Formatting with JSON & flow approvals (2)

SharePoint list forms consist of the following zones:

  • Title Zone: Displays the title of the list item and allows users to edit it.
  • Display Form Zone: Shows the read-only view of the list item's data.
  • Edit Form Zone: Contains the editable fields where users can input or modify data.
  • New Form Zone: Appears when users create a new list item, displaying the fields they need to fill out.
  • Footer Zone: Located at the bottom of the form, it typically contains buttons for saving, canceling, or submitting the form.
SharePoint List Title Column [Remove or Hide Title Column With Examples]
SharePoint List Title Column [Remove or Hide Title Column With Examples]

Formatting the Title Zone

To format the title zone, you can use CSS to change the appearance of the list item's title. For example, you can increase the font size, change the color, or add a background image.

Here's a simple CSS example to change the font size and color of the list item's title:

Connect a Form to a SharePoint List with Microsoft Flow in 3 Steps
Connect a Form to a SharePoint List with Microsoft Flow in 3 Steps

<style>
  .ms-listview-title {
    font-size: 24px;
    color: #333;
  }
</style>

Formatting the Edit Form Zone

The edit form zone is where most of the formatting action takes place. You can apply styles to individual fields, group fields into sections, or add custom HTML and JavaScript to extend functionality.

To format the edit form zone, you can use CSS to style the fields and sections. You can also use the SharePoint Framework (SPFx) to create custom web parts that integrate with your list forms.

Add Conditional Formatting to a SharePoint Online List
Add Conditional Formatting to a SharePoint Online List

Using JSON Formatting to Customize SharePoint List Forms

SharePoint list form formatting also supports JSON, allowing you to apply complex formatting rules and conditional logic to your forms. With JSON formatting, you can create responsive designs, hide or show fields based on user input, and even add interactive features like dropdown menus and popovers.

Create SharePoint Lists Faster Using Templates
Create SharePoint Lists Faster Using Templates
Customize Modern SharePoint List Forms Tutorial | JSON Formatting, Validations
Customize Modern SharePoint List Forms Tutorial | JSON Formatting, Validations
How to customize Forms in SharePoint Lists 📃
How to customize Forms in SharePoint Lists 📃
Why You Should Never Embed Document Libraries and Lists into SharePoint Pages
Why You Should Never Embed Document Libraries and Lists into SharePoint Pages
How to Create a Custom List in SharePoint | Beginner Tutorial
How to Create a Custom List in SharePoint | Beginner Tutorial
Flow that Adds Forms Results to SharePoint
Flow that Adds Forms Results to SharePoint
the text get started with workflows in sharepoint / microsoft docs
the text get started with workflows in sharepoint / microsoft docs
SharePoint Content Types - BoostSolutions
SharePoint Content Types - BoostSolutions
Site Collections, Sites, Pages, Document Libraries, and Folders - putting it all together | SharePoint Maven
Site Collections, Sites, Pages, Document Libraries, and Folders - putting it all together | SharePoint Maven
How to implement Document Management System in SharePoint using Content Types | SharePoint Maven
How to implement Document Management System in SharePoint using Content Types | SharePoint Maven
How to link SharePoint lists to Microsoft Access
How to link SharePoint lists to Microsoft Access
Learn How To Implement Sharepoint List Validation
Learn How To Implement Sharepoint List Validation
How to track documents in SharePoint using Document ID feature | SharePoint Maven
How to track documents in SharePoint using Document ID feature | SharePoint Maven
a woman holding up a tablet with the text 8 examples for your sharepoint intranet
a woman holding up a tablet with the text 8 examples for your sharepoint intranet
Using SharePoint Online Document Libraries as a Document Management System
Using SharePoint Online Document Libraries as a Document Management System
How to create sites and site collections from a SharePoint Site Template | SharePoint Maven
How to create sites and site collections from a SharePoint Site Template | SharePoint Maven
How to Copy SharePoint Lists Easily
How to Copy SharePoint Lists Easily
How to Add a Project Status Report to Your SharePoint Site
How to Add a Project Status Report to Your SharePoint Site
3 Ways to Display Related Documents in SharePoint
3 Ways to Display Related Documents in SharePoint
4 ways to tag folders with metadata in SharePoint | SharePoint Maven
4 ways to tag folders with metadata in SharePoint | SharePoint Maven

JSON formatting uses a schema that defines the structure and appearance of the form. You can apply JSON formatting to the entire form or target specific fields and zones.

Applying JSON Formatting to Fields

To format individual fields using JSON, you can target the field's internal name or display name. Here's an example of applying a custom style to a field called "Priority":

<style>
  @import url('https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css');
</style>
<script>
  var priorityField = {
    "elmType": "span",
    "txtContent": "Priority: $Priority",
    "style": {
      "color": "#fff",
      "background-color": "#dc3545",
      "padding": "5px 10px",
      "border-radius": "5px"
    }
  };
</script>

Creating Responsive Designs with JSON Formatting

JSON formatting allows you to create responsive designs that adapt to different screen sizes and devices. You can use media queries to apply different styles based on the viewport width, ensuring that your list forms look great on desktops, tablets, and mobile devices.

Here's an example of using a media query to hide a field on small screens:

<style>
  @media (max-width: 640px) {
    .hide-on-small-screens {
      display: none;
    }
  }
</style>

In conclusion, SharePoint list form formatting is a versatile tool that enables you to create engaging and intuitive user experiences. Whether you're a power user or a developer, understanding and leveraging the capabilities of SharePoint list form formatting can help you unlock the full potential of SharePoint lists. So go ahead, explore the possibilities, and transform your SharePoint list forms into powerful and dynamic tools for your organization.