Skip to content

forms-react 0.1.0-inte-000433

Install from the command line:
Learn more about npm packages
$ npm install @episerver/forms-react@0.1.0-inte-000433
Install via package.json:
"@episerver/forms-react": "0.1.0-inte-000433"

About this version

Headless Form React Documentation

There are two components can be used when install package @episerver/forms-react:

Form

Description

This is the main component that will be used to render the form from the metadata received from the Headless Form API

Usage

<Form
    formKey={formKey}
    language={language}
    baseUrl={"/"}
    identityInfo={identityInfo} 
    history={history}
    currentPageUrl={"http://yourdomain/en/"}
    optiGraphUrl={"https://cg.optimizely.com/content/v2?auth={singlekey}"}
/>

Propperties

  • formKey - The form key that identifies the form
  • language - The code of the form language
  • baseUrl - The base url of Headless Form API
  • identityInfo - Access token for form submit
  • history - The instance of useHistory() received from react-router-dom
  • currentPageUrl - The public url of current page
  • optiGraphUrl - The endpoint url of Optimizely Graph with your singlekey

FormLogin

Description

This is a component that will be used to render a login form, it helps to login to Headless Form API

Usage

<FormLogin
    clientId='TestClient'
    authBaseUrl={""}
    onAuthenticated={handleAuthen} />

Properties

  • clientId - Client Id that's allowed access API
  • authBaseUrl - Endpoint to get access token
  • onAuthenticated - Callback function when authenticated successfully

Details


Assets

  • forms-react-0.1.0-inte-000433.tgz

Download activity

  • Total downloads 0
  • Last 30 days 0
  • Last week 0
  • Today 0