Skip to content

Commit

Permalink
Merge pull request #125 from episerver/feature/AFORM-4132-Update_JS_S…
Browse files Browse the repository at this point in the history
…DK_readme

Update readme
  • Loading branch information
linhhoangOpti authored May 28, 2024
2 parents bef2e0f + 091976f commit d66e015
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ Install from the command line
npm run setup
```

To setup musicfestival:
- https://github.com/episerver/content-headless-form-js-sdk/tree/develop/samples/musicfestival-backend-dotnet
- https://github.com/episerver/content-headless-form-js-sdk/tree/develop/samples/musicfestival-frontend-react

3. Build all projects

```sh
Expand Down Expand Up @@ -87,4 +91,4 @@ Create a form with some elements in MainContentArea of Start page.

```sh
http://localhost:3000/
```
```
1 change: 1 addition & 0 deletions samples/musicfestival-frontend-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ This project uses:
- `...`
- `models/` contains models retrieving messages from CMS
- `pages/` contains all pages of the site
- `BuyTicketPage.tsx` render form using data retrieved from Content Graph
- `authService.js` contains OIDC config
- `generated.ts` is generated file on folder `graphql/`
- `...`
Expand Down
20 changes: 20 additions & 0 deletions src/@episerver/forms-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,26 @@ This is the main component that will be used to render the form from the metadat
* currentPageUrl - The public url of current page
* optiGraphUrl - The endpoint url of Optimizely Graph with your singlekey

## FormContainerBlock
### Description
This is the main component that will be used to render the form from data received from the Headless Form API
### Usage
```js
<FormContainerBlock
form={formData}
identityInfo={identityInfo}
baseUrl={"/"}
history={history}
currentPageUrl={"http://yourdomain/en/"}
/>
```
### Propperties
* form - The form data to render form
* identityInfo - Access token for form submit
* baseUrl - The base url of Headless Form API
* history - The instance of useHistory() received from react-router-dom
* currentPageUrl - The public url of current page

## FormLogin
### Description
This is a component that will be used to render a login form, it helps to login to Headless Form API
Expand Down

0 comments on commit d66e015

Please sign in to comment.