I'm trying to create a shortcode, which call a Gravity Forms form into a fancybox. So far I'm done with it, but it turns out that the form is rendered in a place where it is not supposed to. It gets rendered in the beginning of my content loop (instead of the div I want it to get rendered into).
The correct (as of what should be) code looks like this:
<a id="inline" class="btn fancybox" href="#form"><span>Get form</span></a></span></a><div id="form" style="display: none;"><?php .gravity_form(2, false, false, false, '', false) ?></div>
However, the form does not render in the "form" div, but instead in front of the a tag.