@7factor/form-builder 中文文档教程
7Factor Form-Builder Forms on Web
该库旨在帮助您在 React 应用程序中呈现自定义 Form-Builder 表单。
Installation
yarn add @7factor/form-builder
Usage
import Form from "@7factor/form-builder-web"
return () => <Form
id="THE_ID_OF_YOUR_FORM"
initialValues={{
name: "value"
}}
disableFields={['id']}
hideSubmit={false}
onSubmit={ (values) => /* Do Something */ }
/>
Property | Default Value | Required ? | Function |
---|---|---|---|
id | none | yes | This is the id of the form to render, found in your form URL |
initialValues | none | no | Use this to default any values in your form. |
disableFields | none | no | Use this array of strings, the name of each field, to prevent the user from editing them. |
hideSubmit | false | no | Optionally hide the submit button for readonly viewing. |
onSubmit | none | no | Use this to prevent the submission on Form-Builder and instead handle it locally within your applicatoin |
Contributing
请参阅贡献指南,了解如何为存储库和开发工作流程做出贡献。
License
麻省理工学院
7Factor Form-Builder Forms on Web
This library is intended to help you render custom Form-Builder forms in your react application.
Installation
yarn add @7factor/form-builder
Usage
import Form from "@7factor/form-builder-web"
return () => <Form
id="THE_ID_OF_YOUR_FORM"
initialValues={{
name: "value"
}}
disableFields={['id']}
hideSubmit={false}
onSubmit={ (values) => /* Do Something */ }
/>
Property | Default Value | Required ? | Function |
---|---|---|---|
id | none | yes | This is the id of the form to render, found in your form URL |
initialValues | none | no | Use this to default any values in your form. |
disableFields | none | no | Use this array of strings, the name of each field, to prevent the user from editing them. |
hideSubmit | false | no | Optionally hide the submit button for readonly viewing. |
onSubmit | none | no | Use this to prevent the submission on Form-Builder and instead handle it locally within your applicatoin |
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT