Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
NotificationsYou must be signed in to change notification settings

episerver/content-headless-form-js-sdk

Repository files navigation

This JS SDK package helps render a form based on metadata taken from the Headless Form API. In this package, there are 2 main parts:

ProjectDescriptionDoc
@episerver/forms-sdkJS SDK for models, client validation, form loader, form dependencies, form submithttps://github.com/episerver/content-headless-form-js-sdk/tree/develop/src/%40episerver/forms-sdk#readme
@episerver/forms-reactReact SDK for rendering a form as a React componenthttps://github.com/episerver/content-headless-form-js-sdk/tree/develop/src/%40episerver/forms-react#readme

ref:

https://docs.developers.optimizely.com/content-management-system/v1.2.0-forms/docs/get-started-with-headless-optimizely-forms

https://world.optimizely.com/blogs/linh-hoang/dates/2024/8/optimizely-headless-form-setup/

Wiki:

Setup AAD with Form Headless API

Setup Anonymous token provider with Headless Forms

Setup Form Headless API with OIDC

Getting Started

Installation

From Azure Artifacts

Sourcehttps://dev.azure.com/EpiserverEngineering/netCore/_artifacts/feed/HeadlessForms

To use packages from Azure Artifacts, configure your project to reference this feed. Create a new text file called .npmrc in the same directory as your package.json, then copy the snippet below.

   @episerver:registry=https://pkgs.dev.azure.com/EpiserverEngineering/netCore/_packaging/HeadlessForms/npm/registry/

Install from the command line

   $ npm install @episerver/forms-sdk@%verion%
   $ npm install @episerver/forms-react@%verion%

OR clone source code and install dependencies, then build and view the site on the browser.

Sample site structures

This repository contains two sample sites

  • Site render using Headless Form Api
    • /samples/ManagementSite Backend decouples site that hosts the Headless Form API
    • /samples/sample-react-app Frontend React site that render form using Headless Form API
  • Site render using Content Graph
    • /samples/musicfestival-backend-dotnet Backend site that fully index using Content Graph
    • /samples/musicfestival-frontend-react Frontend React site that renders the full site, including the Form, using Content Graph

Installing and running sample sites

  1. Clone repo
   git clone https://github.com/episerver/content-headless-form-js-sdk.git
cd content-headless-form-js-sdk
  1. Install package dependencies and database
   npm run setup

To setup musicfestival:

  1. Build all projects
   npm run build
  1. Start management site
   npm run start-backend

for musicfestival sample site

   npm run start-musicfestival-backend
  1. Start react site
   npm run start-frontend

for musicfestival sample site

   npm run start-musicfestival

View site on browser

Create a form with some elements in MainContentArea of Start page.

  1. Management page
   http://localhost:8082/episerver/cms
  1. React page
   http://localhost:3000/

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors14

Languages


[8]ページ先頭

©2009-2025 Movatter.jp