Getting Backbone-Forms to work with Marionette.js

630 views
Skip to first unread message

jbal...@cfemedia.com

unread,
Nov 18, 2013, 3:52:35 PM11/18/13
to backbon...@googlegroups.com
I am currently working on project that uses Marionette.js that is going to use a lot of forms to help the user navigate through search results and I thought backbone-forms would be perfect for that but I have run into a problem. When I try to show a Backbone.Form in a Marionette.Region it does not display. I have tried calling the Marionette.Region through jQuery and that also did not work. But when I just append the form to the body of the html document with jquery it does display. So I was wondering if Backbone-Forms and Marionette.js are compatiable and if so how do I get a form to display in a region?

 Here is the function I am calling.

createMenu: function() {
var searchForm = new Application.SearchForm();
var searchFormView = new Backbone.Form({
model: searchForm
}).render();
//mainLayout.menuRegion.show(searchFormView); does not work
//$("#menu-region").append(searchFormView.el); does not work
                                $("body").append(searchFormView.el); //does work
}  

Thanks in advance for the help.

Charles Davison

unread,
Nov 19, 2013, 8:07:04 AM11/19/13
to backbon...@googlegroups.com
This might help; if not might be worth asking on Marionette how this is done as I'm not sure:


--
You received this message because you are subscribed to the Google Groups "Backbone-forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to backbone-form...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages