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.