SharePoint list forms are a powerful tool for managing and organizing information within your SharePoint environment. However, the default forms may not always align with your specific needs or branding. This is where JSON formatting comes into play, offering a flexible and efficient way to customize the appearance and behavior of your SharePoint list forms.

JSON (JavaScript Object Notation) is a lightweight data interchange format that is easy for humans to read and write and easy for machines to parse and generate. In SharePoint, JSON formatting allows you to apply custom styles, add conditional formatting, and even modify the behavior of form fields, enhancing the user experience and improving data accuracy.

Understanding JSON Formatting in SharePoint List Forms
Before diving into the specifics of JSON formatting, it's essential to understand the basics. JSON formatting is applied to SharePoint list forms using the 'Formatting' column property. This property accepts JSON objects that define the visual and behavioral aspects of the form fields.

JSON objects consist of key-value pairs, where keys are strings and values can be strings, numbers, objects, arrays, booleans, or null. In the context of SharePoint, these keys correspond to the properties of the form fields that you want to customize, such as 'fillColor', 'fontWeight', or 'required'.
JSON Formatting Syntax
![SharePoint List Title Column [Remove or Hide Title Column With Examples]](https://i.pinimg.com/originals/97/c9/9a/97c99ad4f3e53fd48ea7e68c85ecea9e.jpg)
JSON syntax is straightforward and consists of the following rules:
- Data is in key-value pairs, separated by commas.
- Keys must be strings, enclosed in double quotes.
- Values can be strings (enclosed in double quotes), numbers, objects (enclosed in curly braces), arrays (enclosed in square brackets), booleans (true or false), or null.
- Curly braces hold objects, and square brackets hold arrays.
- Indentation is used to indicate structure, but not required.
JSON Formatting Examples

Here are a few simple examples of JSON formatting to illustrate its syntax and functionality:
{"fillColor": "#FF0000", "fontWeight": "bold"}- This JSON object sets the fill color to red and the font weight to bold.{"visible": {"operator": "!=", "value": "Yes"}}- This JSON object hides the field when the value is not "Yes".{"style": {"color": "green", "font-size": "18px"}}- This JSON object changes the text color to green and the font size to 18 pixels.
Applying JSON Formatting to SharePoint List Forms
![Display SharePoint List Items in a SPFX Web Part [Tabular Format]](https://i.pinimg.com/originals/ef/45/21/ef45215299f094b62fbf5fd9eee232aa.jpg)
Now that you understand the basics of JSON formatting, let's explore how to apply it to SharePoint list forms. The process involves editing the list form and applying the JSON formatting to the desired fields.
To access the JSON formatting options, click on the 'Formatting' column property in the list settings. This will open the 'Formatting' pane, where you can enter your JSON code. You can also use the 'Advanced Mode' option to view and edit the JSON code directly.




















Customizing Form Field Appearance
JSON formatting allows you to customize the appearance of form fields in various ways. For example, you can change the background color, text color, font size, and font weight. You can also add icons, borders, and other visual elements to enhance the form's appearance.
Here's an example of JSON code that changes the background color of a field to light blue and the text color to dark blue:
{"backgroundColor": "#ADD8E6", "color": "#00008B"}
Adding Conditional Formatting
Conditional formatting allows you to apply different styles based on the value of a field. This can be useful for highlighting important information or indicating the status of a record. For example, you can display a red background when the 'Status' field is set to 'Overdue'.
Here's an example of JSON code that applies conditional formatting based on the value of the 'Status' field:
{"backgroundColor": {"operator": "==", "value": "Overdue", "fill": "#FF0000"}}
Modifying Form Field Behavior
In addition to customizing the appearance of form fields, JSON formatting also allows you to modify their behavior. For example, you can make a field required, hide it, or disable it. You can also add validation rules to ensure that users enter valid data.
Here's an example of JSON code that makes a field required and adds a validation rule to ensure that the value is a valid email address:
{"required": true, "validation": {"type": "email", "message": "Please enter a valid email address."}}
In conclusion, JSON formatting is a powerful tool for customizing SharePoint list forms. It allows you to apply custom styles, add conditional formatting, and modify the behavior of form fields, enhancing the user experience and improving data accuracy. By leveraging the flexibility and efficiency of JSON formatting, you can create SharePoint list forms that meet the specific needs of your organization and align with your branding. So, start exploring the world of JSON formatting today and unlock the full potential of your SharePoint list forms!