Open conoremclaughlin opened 12 years ago
Can you post your form schema / subSchema? (and if you made any custom editors or whatnot)
I also receive form into form effect but in nested model. i unwraped inner form with jquery but it's ugly approach. I can't figure out why second form rendered?
Observing the same issue. Below produces a form in a form.
schema: {
formInForm: { type: 'Object', subSchema:{
foo: 'Text'}
}
}
The fix I guess we could use is on Object and NestedObject editors is:
//this.$el.html(this.form.render().el);
this.$el.html(this.form.render().$('fieldset:first-child'));
However, this behavior may not be what is desired if rendering the editor independently. I guess we would have to add an option that asks if you want it wrapped in a form element or not.
Possible solution for this here: https://github.com/rjmackay/backbone-forms/commit/f8a8e8cca7599056fbe87f3c3e9ebd69cebe9728
Hi,
The plugin is awesome. so I'm doing some basic integration with the library bones. I'm having an issue, though, so if I'm doing something wrong it'd be great to get your help.
Used the npm install for backbone-forms and used Form.setTemplates to add an after the fieldsets within the form:
It kept getting ejected from the form element so I used http://validator.w3.org/check to validate the html and it looks like subSchema is generating another form for the new object fieldset. Compliant parsers ignore the second opening form tag and will just close the parent form tag when it encounters the first close tag. This was closing the other tags and forcing my input element out. Quick excerpt for clarification:
I've just flattened my schemas for now, but wanted to give you a heads-up or just see if I was doing anything wrong.