@7factor/react-native-form-builder 中文文档教程

发布于 4年前 浏览 33 项目主页 更新于 3年前

react-native-form-builder

在您的 react-native 应用程序中呈现您在 form-b​​uilder.io 创建的自定义表单。

Installation

yarn add @7factor/react-native-form-builder react-native-webview

Usage

import Form from "react-native-form-builder";

return () => <Form 
        id="THE_ID_OF_YOUR_FORM"
        initialValues={{
            name: "value"
        }}
        disableFields={['id']}
        hideSubmit={false}
        onSubmit={ (values) => /* Do Something */ }
    />
PropertyDefault ValueRequired ?Function
idnoneyesThis is the id of the form to render, found in your form URL
initialValuesnonenoUse this to default any values in your form.
disableFieldsnonenoUse this array of strings, the name of each field, to prevent the user from editing them.
hideSubmitfalsenoOptionally hide the submit button for readonly viewing.
onSubmitnonenoUse this to prevent the submission on Form-Builder and instead handle it locally within your applicatoin

Contributing

请参阅贡献指南以了解如何为存储库和开发工作流程做出贡献。

License

麻省理工学院

react-native-form-builder

Render your custom forms created at form-builder.io in your react-native application..

Installation

yarn add @7factor/react-native-form-builder react-native-webview

Usage

import Form from "react-native-form-builder";

return () => <Form 
        id="THE_ID_OF_YOUR_FORM"
        initialValues={{
            name: "value"
        }}
        disableFields={['id']}
        hideSubmit={false}
        onSubmit={ (values) => /* Do Something */ }
    />
PropertyDefault ValueRequired ?Function
idnoneyesThis is the id of the form to render, found in your form URL
initialValuesnonenoUse this to default any values in your form.
disableFieldsnonenoUse this array of strings, the name of each field, to prevent the user from editing them.
hideSubmitfalsenoOptionally hide the submit button for readonly viewing.
onSubmitnonenoUse 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

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文