Skip to content
mleitao27 edited this page Apr 4, 2020 · 29 revisions

react-native-json-forms

Description

Tool to create forms in React Native from a json file containing the form description. This tool is compatible with forms created using SurveyJS but contains some extra features and also allows extensions. Information about the elements and extensions can be found in the Elements Page.

Installation

$ npm install --save react-native-json-forms

Usage

` import React from 'react'; import { View } from 'react-native';

import data from '../../data/surveyjs.json';

import Form from '../Form';

import FormExtension from '../../extension/FormExtension';

const FormScreen = props => {

const onSubmit = (data) => {
    console.log(data);
};

return (
    <View >
        <Form json={data} extension={FormExtension} onSubmit={onSubmit} />
    </View>
);

};

export default FormScreen; `

Clone this wiki locally