Gathering detailed insights and metrics for chaincodedev-form-builder
Gathering detailed insights and metrics for chaincodedev-form-builder
Gathering detailed insights and metrics for chaincodedev-form-builder
Gathering detailed insights and metrics for chaincodedev-form-builder
npm install chaincodedev-form-builder
Typescript
Module System
Node Version
NPM Version
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Total Downloads
51,113
Last Day
5
Last Week
31
Last Month
289
Last Year
4,653
Latest Version
2.4.6
Package Id
chaincodedev-form-builder@2.4.6
Unpacked Size
5.63 MB
Size
1.16 MB
File Count
92
NPM Version
7.24.0
Node Version
16.10.0
Published on
May 17, 2023
Cumulative downloads
Total Downloads
Last Day
0%
5
Compared to previous day
Last Week
-13.9%
31
Compared to previous week
Last Month
-66.6%
289
Compared to previous month
Last Year
-77.9%
4,653
Compared to previous year
46
35
Fork of Form-Builder By Kiho
A complete react form builder that interfaces with a json endpoint to load and save generated forms.
DEMO Slow Loading.... back-end is running at FREE Heroku.
1import React from 'react'; 2import ReactDOM from 'react-dom'; 3import { ReactFormBuilder } from 'react-form-builder2'; 4import 'react-form-builder2/dist/app.css'; 5 6ReactDOM.render( 7 <ReactFormBuilder />, 8 document.body 9)
1var items = [{ 2 key: 'Header', 3 name: 'Header Text', 4 icon: 'fa fa-header', 5 static: true, 6 content: 'Placeholder Text...' 7}, 8{ 9 key: 'Paragraph', 10 name: 'Paragraph', 11 static: true, 12 icon: 'fa fa-paragraph', 13 content: 'Placeholder Text...' 14}]; 15 16<ReactFormBuilder 17 url='path/to/GET/initial.json' 18 toolbarItems={items} 19 saveUrl='path/to/POST/built/form.json' />
Now that a form is built and saved, let's generate it from the saved json.
1import React from 'react'; 2import ReactDOM from 'react-dom'; 3import { ReactFormGenerator } from 'react-form-builder2'; 4import 'react-form-builder2/dist/app.css'; 5 6ReactDOM.render( 7 <ReactFormGenerator 8 form_action="/path/to/form/submit" 9 form_method="POST" 10 task_id={12} // Used to submit a hidden variable with the id to the form from the database. 11 answer_data={JSON_ANSWERS} // Answer data, only used if loading a pre-existing form with values. 12 authenticity_token={AUTH_TOKEN} // If using Rails and need an auth token to submit form. 13 data={JSON_QUESTION_DATA} // Question data 14 />, 15 document.body 16)
Name | Type | Required? | Description |
---|---|---|---|
form_action | string | Required | URL path to submit the form |
form_method | string | Required | Verb used in the form submission. |
action_name | string | Optional | Defines form submit button text. Defaults to "Submit" |
onSubmit | function | optional | Invoke when submit data, if exists will override form post. |
data | array | Required | Question data retrieved from the database |
back_action | string | Optional | URL path to go back if needed. |
back_name | string | Optional | Button text for back action. Defaults to "Cancel". |
task_id | integer | Optional | User to submit a hidden variable with id to the form on the backend database. |
answer_data | array | Optional | Answer data, only used if loading a pre-existing form with values. |
authenticity_token | string | Optional | If using Rails and need an auth token to submit form. |
hide_actions | boolean | Optional | If you would like to hide the submit / cancel buttons set to true. |
skip_validations | boolean | Optional | Suppress form validations on submit, if set to true. |
display_short | boolean | Optional | Display an optional "shorter page/form" which is common for legal documents or situations where the user will just have to sign or fill out a shorter form with only the critical elements. |
read_only | boolean | Optional | Shows a read only version which has fields disabled and removes "required" labels. |
variables | object | Optional | Key/value object that can be used for Signature variable replacement. |
Read only signatures allow you to use a saved/canned signature to be placed into the form. The signature will be passed in through the variables
property to ReactFormGenerator
and ReactFormBuilder
.
To use a read only signature, choose the "Read only" option and enter the key value of the variable that will be used to pass in the signature.
The signature data should be in base 64 format.
There is a variables.js
file that contains a sample base 64 signature. This variable is passed into the demo builder and generator for testing. Use the variable key "JOHN" to test the variable replacement.
In order to make the form builder look pretty, there are a few dependencies other than React. Style sheets from Bootstrap
and FontAwesome
must be added to index.html. See the example code in index.html for more details.
All relevant styles are located in css/application.css.scss.
First we need to start obortech admin project because in file upload component we are storing the uploaded file from the server so at first we need to start the obortech admin in http://localhost:4000
1$ npm install 2$ npm run build:dist 3$ npm run serve:api 4$ npm start
Then navigate to http://localhost:8080/ in your browser and you should be able to see the form builder in action.
1$ npm test
Test is not working at this moment.
if you face any unknown issues after deployed in live on form builder file upload or file edit that maybe because of the react-filerobot-image-editor version we need to find the correct version and use that. right now im using "react-filerobot-image-editor": "^4.0.0-beta.38",
No vulnerabilities found.
No security vulnerabilities found.