Comments (5)
Did you attach a schema to the collection? https://github.com/nicolaslopezj/simple-react-form#basic-example
from simple-react-form.
Thanks Nicolas,
Yes I did...
import {mongo} from 'meteor/mongo';
import { SimpleSchema } from 'meteor/aldeed:simple-schema';
export const Scenes = new Mongo.Collection ('scenes');
SceneSchema = new SimpleSchema({
project_ID: {
type:Number,
label: "Project ID",
},
scene_no: {
type: Number,
label: "Scene Number",
},
createdAt: {
type: Date,
label: "Created At",
//autovalue: function (){
//return new Date()
//}
},
set: {
type: String,
label: "Scene Number",
},
set_ie:{
type: Number,
label: "Int/Ext",
},
set_time: {
type: String,
label: "Time",
},
synopsis: {
type: String,
label: "Synopsis",
},
sequence:{
type: String,
label: "Sequence",
},
script_page:{
type: String,
label: "Script Page",
},
script_day:{
type: String,
label: "Script Day",
},
location:{
type: String,
label: "Location",
},
unit:{
type: String,
label: "Unit",
},
comments:{
type: String,
label: "Comments",
},
});
Scenes.attachSchema(SceneSchema);
from simple-react-form.
You're exporting (or importing) incorrectly the collection.
Do it this way
import {mongo} from 'meteor/mongo';
import { SimpleSchema } from 'meteor/aldeed:simple-schema';
const Scenes = new Mongo.Collection ('scenes');
...
export default Scenes
You are importing it as if it was default exported (without {})
from simple-react-form.
Thanks Nicolas. I think it's sorted, but now getting...
You must pass a schema or manually render the fields(…)??
from simple-react-form.
Set the srf.type
of the fields
import {Meteor} from 'meteor/meteor'
import Textarea from 'simple-react-form-material-ui/lib/textarea'
import Text from 'simple-react-form-material-ui/lib/text'
const Posts = new Meteor.Collection('posts')
Posts.attachSchema({
title: {
type: String,
srf: {
type: Text
}
},
body: {
type: String,
label: 'Content',
srf: {
type: Textarea
}
}
})
or render manually the form
<Form
collection={Posts}
type='update'
ref='form'
doc={this.props.post}>
<Field fieldName='title'/>
<Field fieldName='body'/>
</Form>
from simple-react-form.
Related Issues (20)
- Issues over on simple-react-form-material-ui
- Sharing Custom Field Componets HOT 1
- Add support to latest Simple Schema HOT 1
- Pre-submit hook HOT 3
- Validation HOT 1
- Cannot read property propTypes of null HOT 1
- React native with Array field: 'There is no field "parentField.0.0.childField" in the schema'
- SSR: ReferenceError: navigator is not defined
- simple-react-form problem with textfields? HOT 3
- Wrong Mongo modifier format for update form with commitOnlyChanges={true} HOT 1
- Need Maintenance Help? HOT 1
- Uncaught Error: There is no field "Sections.0.0.SectionName" in the schema. HOT 2
- Validation Issue HOT 3
- Remove Depend React Native HOT 2
- Problems with some types HOT 1
- Why need AttachSchema ? HOT 1
- React v15 compatibility? HOT 1
- Specifying onChange for a field blocks that field's value from being passed to the form's onChange. HOT 1
- Should be able to get the value of the form
- How to Display ServerSide validation errors HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simple-react-form.