Closed hnqso closed 10 years ago
You'll need to add the 'meta' field as a new field within the Backbone.Form schema rather than adding it simply as HTML. Then re-render the form.
On Mon, Jul 14, 2014 at 4:08 PM, Henrique Alves notifications@github.com wrote:
I have the follow case where I need update dynamically the form DOM after the form has been rendered and added to the DOM e.g.
form = new Backbone.Form({ template: _.template($('formTemplate').html()), model: user,}).render(); $('#signupForm').html( form.el); // update form dom$('#signupForm') .prepend(''); // doesn't workform.on('submit', function(e){ // ...})
However the form submit stop working and things like validation doesn't work as well, the form is submit directly. Any workaround for this?
Thanks
Reply to this email directly or view it on GitHub https://github.com/powmedia/backbone-forms/issues/400.
@powmedia my problem is more complex than that because I'm working with localisation and the locales are in the schema. I'm going to do a different approach so I don't have to re-render the form. I'm closing this issues. Keep the good work mate!
I have the follow case where I need update dynamically the form DOM after the form has been rendered and added to the DOM e.g.
However the
form
submit stop working and things like validation doesn't work as well, the form is submit directly. Any workaround for this?Thanks