content-headless-form-js-sdk
Headless Form JS SDK
This is a JS SDK package that helps render a form based on metadata taken from the Headless Form API. In this package, there are 2 main parts:
Project | Description |
---|---|
@optimizely/forms-sdk | JS SDK for models, client validation, form loader, form dependencies, form submit |
@optimizely/forms-react | React SDK for rendering a form as a React component |
Getting Started
Installation
Clone source code and install dependencies, then build and view site on the browser.
- Clone repo
git clone https://github.com/episerver/content-headless-form-js-sdk.git
cd content-headless-form-js-sdk
- Install package dependencies and database
npm run setup
- Build all projects
npm run build
- Run unit tests
npm run test
- Start management site
npm run start-backend
- Start react site
npm run start-frontend
View site on browser
Access management site with credentials:
Name | Password |
---|---|
cmsadmin | sparr0wHawk! |
emil | sparr0wHawk! |
ida | sparr0wHawk! |
alfred | sparr0wHawk! |
lina | sparr0wHawk! |
Create a form with some elements in MainContentArea of Start page.
- Management page
http://localhost:8082/episerver/cms
- React page
http://localhost:3000/