
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-dj-forms-builder
Advanced tools
Author: Daniel da Silva Jegorschki Santos (https://github.com/dsjsantos)
Date: August 2020
Description: A JSON based forms builder react component that renders and control a web form based on JSON configuration file.
npm install --save react-dj-forms-builder
See component full documentation in Documentation.md file.
import FormBuilder from 'react-dj-forms-builder';
<FormBuilder {...props} />
Remember that 'config' and 'onChange' properties are required. See full documentation for further information.
This project includes a demonstration application under usage_demo folder. Clone or dowload the project, go into 'usage_demo' folder and run:
npm install
PUBLIC_URL=. npm start
The required component style sheet is automatically included and there is no need for additional style import. You may customize specific appearence in you application style sheet to fits your needs.
The following code shows a simple component usage. First we have a CSS file 'formDemo.css' for a simple customization and a 'fileDemo.js' wich is the demo itself that includes de CSS file.
body {
margin: 0;
padding: 1em;
}
.group-card {
background-color: #ddd;
padding: 0.75em 1em;
}
.group-card.login-title ._djfb_grid-group-title {
font-weight: bold;
margin: -1em -1em 0 -1em;
padding: 0.5em 1em;
color: white;
background-color: darkorange;
}
.group-card ._djfb_grid-group-content {
margin-top: 0.5em;
}
import React, { useState } from "react";
import FormBuilder from 'react-dj-forms-builder';
import './formDemo.css';
const formLogin = {
"pages": [
{
"groups": [
{
"rowType": "fullwidth",
"className": "group-card login-title",
"title": "Login:",
"description": null,
"requiredMarkTitle": true,
"fields": {
"username": {
"type": "input",
"className": "username-field",
"label": "Username:",
"placeHolder": "Enter your username",
"requiredMark": false,
"regExInput": "^[a-zA-Z0-9]{1,32}$"
},
"passphrase": {
"type": "input",
"className": "passphrase-field",
"label": "Password:",
"placeHolder": "Enter your password",
"isPasswordInput": true,
"requiredMark": false
}
}
}
]
}
]
};
const FormDemo = () => {
const [ fields, setFields ] = useState(null);
const _handleFormUpdate = (newFields) => {
setFields(newFields);
}
return(
<>
<h1>Exemplo Forms Builder</h1>
<FormBuilder
id={"mainFormId"}
name="mainForm"
config={formLogin}
rootAsForm={true}
fields={null}
page={0}
className="main-form"
onChange={_handleFormUpdate}
/>
<button
type="button"
style={{ marginTop: '2em'}}
onClick={() => console.log("Fields:", fields)}>
Show form current state
</button>
</>
);
}
export default FormDemo;
Clone/fork the repository
npm install
npm run build
FAQs
A JSON based forms builder react component
We found that react-dj-forms-builder demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.