Skip to content

Rebuilding InfoPath List Forms in SharePoint Online with an SPFx Form Customizer (Open Source)

Billy Peralta

7 min read

Paper questionnaires and a pen beside a laptop on a wooden desk

2H Media on Unsplash

Topics: SPFx, SharePoint Framework, InfoPath, SharePoint Online, Open Source

Microsoft removed InfoPath Forms Services from SharePoint Online after July 14, 2026. Publishing new or updated forms was blocked after May 18, and Microsoft did not provide an automated migration tool. Organisations that relied on InfoPath list forms now need a replacement.

I built an open-source SharePoint Framework (SPFx) form customizer for a common scenario: a SharePoint list form with sections, business rules, validation and lookups. It replaces the New, Edit and Display forms for a configured list content type, using a JSON definition.

It is not an automatic InfoPath converter, and it doesn’t cover every InfoPath feature. It’s a way to rebuild typical list forms inside SharePoint, with the rules kept in one readable file. Everything below comes from a demo site with fictional Contoso data.

A purchase request form with sections, a cascading cost centre, a calculated total and a conditional urgency field

TL;DR

  • An SPFx 1.24.2 form customizer for a list’s New, Edit and Display forms.
  • Layout and rules live in a JSON file in Site Assets, checked against the list’s columns when the form opens.
  • Show/hide and required rules, validation with an error summary, cascading lookups and calculated values.
  • No external backend or additional API permission requests. The form uses SharePoint REST with the signed-in user’s existing permissions.
  • Form rules guide people. SharePoint permissions still protect the data.

What the form does

The demo is a purchase request, a classic InfoPath form:

  • Defaults. The requester and today’s date are filled in.
  • Cascading lookup. Choose a department, and only that department’s cost centres are offered.
  • Calculated total. Quantity × unit price, updated as you type.
  • Conditional field. Mark the request urgent, and a “Reason for urgency” field appears and becomes required.
  • Validation. “Needed by” can’t be before the request date, quantities have limits, and a short justification is rejected.

Choosing Finance limits the cost centre list to Finance's two cost centres

When something is wrong, the form lists the problems at the top. Each line links to its field, and nothing is saved until they’re fixed:

The error summary: business justification too short, reason for urgency required

There’s also a read-only display view with a Print button, and the layout drops to one column on a phone.

The purchase request is just one example. The same configuration-driven approach could be adapted for equipment requests, employee onboarding, internal service requests and other SharePoint list-based business processes, subject to the supported field types and rules.

Layout and business rules in one JSON file

Each configured list content type gets a JSON definition at SiteAssets/form-definitions/<list-guid>/<content-type-id>.json. This excerpt from the purchase request’s field definitions makes the urgency field conditional and the total calculated:

[
  { "name": "EstimatedTotal",
    "computed": { "op": "multiply", "fields": ["Quantity", "UnitPrice"] } },
  { "name": "UrgencyReason",
    "visibleWhen":  { "field": "Priority", "op": "eq", "value": "Urgent" },
    "requiredWhen": { "field": "Priority", "op": "eq", "value": "Urgent" } }
]

Conditions are declarative data, not executable JavaScript. The rules engine evaluates simple comparisons (eq, in, empty, gt…) and logical operators (all, any, not), as well as the current form mode.

The form checks the definition against the list’s real columns every time it opens. A misspelled setting, a column that doesn’t exist, or a required column missing from the form all show up as plain messages, and saving is turned off:

A configuration error listing an unknown setting and an invalid control

I made that choice on purpose. Falling back to a guessed layout when the definition is broken could hide configuration problems and allow unintended data changes. I’d rather stop and explain what needs fixing.

The parts that took the most care

Most of the work wasn’t the layout. It was the details that decide whether people can trust a form with real data.

  • Conflicts. Edits are saved with the item’s version (ETag). If someone else saved the item after you opened it, the form tells you and offers a reload instead of quietly overwriting their change.

    Someone else changed this item after you opened it

  • Dates. Date-only columns are converted using the SharePoint site’s regional time zone settings. My first version used the browser’s time zone and could display the wrong day. Testing in a real SharePoint site caught the problem.

  • Numbers. Typing “5x” doesn’t quietly keep the old value: the field reports it, and the form won’t save. Numbers are read with the user’s decimal separator, so “12,5” works in French.

  • Lookups. A cascading lookup clears its value when the parent changes to something it doesn’t fit, but an existing value is never wiped just because a list is long.

  • Unsaved changes. Leaving with unsaved changes asks first, once.

The project went through separate code, security and accessibility reviews, and I addressed the reported findings before release. It also includes 34 automated unit tests.

Form rules are not security

This is worth saying plainly, because InfoPath forms were sometimes treated as a control.

Hidden fields, read-only fields, validation and calculated values guide users through the form. They are not column-level security or server-enforced business rules. Users with sufficient item permissions may bypass these controls through other SharePoint interfaces or APIs. Sensitive approval data should be stored separately with appropriate permissions, and critical validation should be enforced server-side where possible.

The install script restricts write access to the definitions folder to the site’s Owners group, reduces other assigned principals to Read and verifies the configuration before activating the form. SharePoint administrators retain their administrative access.

Setting it up

Installation requires appropriate permissions to deploy the SPFx package, configure the list content type and manage the definition folder’s permissions. Test the configuration on a non-production list before replacing existing forms.

  1. Build the package (npm run build) and deploy it to the tenant or site app catalog. No additional API permission requests are required; the form uses the signed-in user’s existing SharePoint permissions.
  2. Write a JSON definition for your list, starting from the sample in the repo.
  3. Run the install script. It backs up the list’s current form settings, uploads the definition, locks the folder and points the list’s content type at the form.
  4. To go back, the uninstall script restores the previous forms. List items are never touched.

The setup guide has every step with screenshots, and the definition reference covers every setting.

When this is the wrong tool

  • You only need to hide, reorder or group a few fields. SharePoint’s own list form configuration and form formatting (JSON headers, footers and sections) cover that without any code.
  • You need low-code development, extensive connectors or a dedicated mobile app. Power Apps may be a better fit. Offline scenarios require additional design and have platform and data-source limitations. Check the licensing before choosing an approach.
  • You need repeating tables or attachments today. They’re not in this version (see below).

An SPFx form is code your organisation maintains. Plan for SPFx upgrades and testing like any other solution.

What’s not in this version

Repeating tables (InfoPath’s repeating sections), attachments, people pickers, multi-value columns, date-and-time columns, rich text, regular-expression validation and rules based on SharePoint group membership. Repeating tables are an important capability for many legacy InfoPath forms, but they deserve their own careful version. Saving a parent with child rows introduces partial failures and concurrency questions that I’d rather get right than rush.

Try it

The GitHub repo has the form customizer, the install and uninstall scripts, a demo-site script, the JSON schema and the docs. It’s MIT-licensed.

Still have legacy InfoPath forms that need rebuilding in SharePoint Online? I help organisations and IT providers evaluate native form formatting, Power Apps and custom SPFx development, then implement the approach that fits their requirements. Learn more about my SPFx development services.

Need a production-ready SPFx solution?

I build SharePoint Framework web parts, extensions, dashboards, and integrations using React, TypeScript, PnPjs, and Microsoft Graph.

16+ years experience Microsoft certified Government & enterprise

Free SharePoint planning resource

Solving the technical issue is only part of the Microsoft 365 problem.

Use the checklist to review the governance, permission, ownership, and support decisions that often determine whether a SharePoint solution succeeds long term.

Download the Checklist

Billy Peralta

SharePoint architect & Microsoft 365 consultant • 16+ years of experience

If you have questions about your SharePoint environment, feel free to reach out.

LinkedIn GitHub

Continue Reading

View all posts