stevevitali / react-form-generator Goto Github PK
View Code? Open in Web Editor NEWGenerate, validate, and parse React forms using Mongoose-inspired JSON schemas
License: MIT License
Generate, validate, and parse React forms using Mongoose-inspired JSON schemas
License: MIT License
lmao
index.js
requires ./dist/form-generator.js
which does not exist. The actual file path is ./dist/FormGenerator.js
warning.js:44 Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of FlatField
. See https://fb.me/react-warning-keys for more information.
My schema:
FormGenerator.create({
stringField: {
type: String,
className: "form-control",
label: 'String Field',
defaultValue: 'Welp',
validators: [
FormGenerator.validators.minLength(1),
FormGenerator.validators.maxLength(10),
function(val) {
if (val.toLowerCase().indexOf('welp') === -1) {
return 'Error: input must contain "welp"';
}
}
],
isRequired: true
},
}, 'form', this.onSubmit)
The fix is to add key: name in the flat field generation parts for textfield, select, etc..
How could I create a selectbox/dropdown which get's its values from a service?
PS: I use this project with Meteor
when new fields are added to schema, they aren't being rendered as per the schema.
this is my link of code
http://pastebin.com/5mgMAGA1
Missing pass values for update exist data/schemas, like that
formGenerator.create({ schema: this.schema, data: this.data, ... });
Why not use the standard JSON schema?
When marking a field as required the field triggers an error even though the form hasn't been submitted.
Great utility by the way, saved me quite a bit of time building a CRUD.
When trying to use form generator in react file, I am getting the following error.
FormGenerator.js:7 Uncaught TypeError: r.interopRequireDefault is not a function
at Object../node_modules/form-generator-react/dist/FormGenerator.js.r.157.../util/babelHelpers.js
I am using react version 15.6.1
First off, thanks for the great effort on this repo, makes the transition to react-native much easier!
I am trying to implement focus next field functionality in my forms but can't since i'm trying to the set the focus of the next input my using the this.refs
property.
this module uses the generic fieldComponent
ref.
may I suggest setting the default ref only if it's not passed as a prop?
I will be happy to contribute and submit a PR.
thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.