Reputation: 2121
I am just starting to use Vazco "Uniforms" in my Meteor Mantra Kickstarter, but I've hit a hard to solve puzzle :
<section class="field form-group">
<label for="uniforms-0000-0002" class="control-label">
Content
</label>
<textarea class="form-control" id="uniforms-0000-0002" name="content" placeholder="">
</textarea>
</section>
That textarea
, for example , as well as all other fields of all kinds on my form, is not write-able.
Is there some mistake I might be making that blocks me from being able to write to the fields in the form?
The JSX for it looks like this:
<BaseForm disabled={false} placeholder={false} schema={this.bridge} >
<div className="row-fluid">
<div className="col-md-4">
<NumField grid={6} name="pages" label="# Pages" value="0"/>
<TextField name="title" label="Title" />
</div>
<div className="col-md-8">
<LongTextField name="content" label="Content"
disabled={false} placeholder={false} />
</div>
</div>
<ErrorsField />
</BaseForm>
I set up the bridge definitions like this :
:
:
this.schemaType = API_AST.getType('Book');
this.schemaValidator = model => {
const details = [];
};
this.schemaData = {
};
console.log("Book schema : ", this.schemaType);
console.log("Schema validator : ", this.schemaValidator);
console.log("Schema data : ", this.schemaData);
this.bridge = new GraphQLBridge(
this.schemaType
, this.schemaValidator
, this.schemaData
);
console.log("The bridge : ", this.bridge);
}
The various console.log( "..." )
instructions show :
Book schema : GraphQLObjectType
_fields: Object
_id: Object
author: Object
content: Object
pages: Object
title: Object
__proto__: Object
_interfaces: Array[0]
_typeConfig: Object,
description: ""
isTypeOf: undefined,
name: "Book",
__proto__: Object
... then ...
Schema validator : function (model) { // 39
var details = [];
... then ...
Schema data : Object
__proto__: Object
... then ...
The bridge : GraphQLBridge
extras: Object
schema: GraphQLObjectType
_fields: Object
_id: Object
author: Object
content: Object
pages: Object
title: Object
__proto__: Object
_interfaces: Array[0]
_typeConfig: Object
description: ""
isTypeOf: undefined
name: "Book"
__proto__: Onject
validator: (model)
__proto__: Bridge
Please let me know if the listings here are insufficient.
Upvotes: 0
Views: 544
Reputation: 4094
It is writable, but you are not doing anything with it. According to the documentation here, BaseForm
have to be used in the same way as a field, where model
is the value and onChange
is... The onChange
of course. You probably want to use AutoForm
or handle the form by yourself - there are few examples in the readme.
Upvotes: 0