JSS Forms API
Describes Sitecore Forms integration in JSS apps using JSS Forms
JSS Forms is a package that implements framework-agnostic helpers to deal with the Sitecore Forms API (serializing forms to post, anti-forgery).
The following is a sequence diagram illustrating the browser-Sitecore flow when using Sitecore Forms in JSS applications:
Installing JSS Forms
To install JSS Forms, use the following:
npm i @sitecore-jss/sitecore-jss-forms
There are some limitations to be aware of with Sitecore Forms in JSS.
To define and render Sitecore Forms in your JSS application, your JSS application must be connected to Sitecore.
JSS Forms does not support Sitecore Robot detection.
Framework-specific form component kits
JSS does not come with any fully-fledged forms implementations for every framework. JSS Forms for React, however, is an example of how to leverage the Forms Service and JSS Forms to create framework-specific form component kits.
Refer to the walkthrough for using a Sitecore Form in React and Next.js applications for how to use JSS Forms for React and use the package as inspiration to create your own form solutions for other frameworks.