How to put "Advanced form block" in a twitter bootstrap modal? I want to add an Advanced Form Block into a modal. So far I've been partially successful, the block is added to the modal but the form is outside the modal markup.



The area marked in red is the form which should be in the div with the class modal-body. How do I make this work?
The problem was that the Advanced Form Block, has a CSS class of .node-form and this is not encapsulated in the standard block content div .block-content. So when the Twitter Bootstrap Modal Block module tries to add the .modal-body CSS class to the .block-contents div, it will not find the div and the form will be left outside the modal body. 

For me the easiest way to solve this was to edit Twitter Bootstrap Modal Block JavaScript file, i.e. sites/all/modules/twitter_bootstrap_modal/twitter_bootstrap_modal_block/twitter_bootstrap/modal_block.js, as follows:

Change the line that reads


$(this).children('.block-content').addClass('modal-body'); //line 29


to 


$(this).children('.block-content, .node-form').wrapAll('&lt;div class="modal-body" /&gt;');


This will put the advanced from block into the modal body.