@shravan64555/dynamicform

0.2.7 • Public • Published

Hey folks welcome!!

About package

This dynamic-form package is specifically created for the form with the categorical sections which contains section name in the left and details of form next to it. As of now we only have three type of fields available "text/checkbox/radio".

usage

Install the latest version of package. Import the "FormUi" using destructuring from package "@shravan64555/dynamicform". "FormData" is a required prop which contains the data of form in JSON format. "getData" is a prop which handles the data of the form when the form is submitted, "getData" requires an function pointer as value so that the data can be passed as parameter on form submission. "Title" is a props which is the title of the form.

FormData Format.

[ { category_Name: [ { "id":<unique_value>, "name":<name_of_label_for_form_field>, "type":<any type among ("text"/"radio"/"checkbox")>, "options": ex:["yes","No] # options Not required for "text" type. } ] } ]

ex: import React from "react" import "" import {FormUi} from "@shravan64555/dynamicform"

function App(){
    return(
        <App>
            <FormUi FormData={"your form data export name"} getData={your handler function which recieves filled form data on submission } Title={title of the form }/>
        </App>
    )
}

Happy usage :)

Readme

Keywords

none

Package Sidebar

Install

npm i @shravan64555/dynamicform

Weekly Downloads

0

Version

0.2.7

License

none

Unpacked Size

20.2 kB

Total Files

12

Last publish

Collaborators

  • shravan64555