• Resolved vmallder

    (@vmallder)


    Hello,

    I love your plugin and I am trying to display a Visual Form Builder Pro form via shortcode in the Fancybox. I followed your instructions in the faq in response to questions about how to display a form in a fancybox and I almost have it working. I have the fancybox being displayed but it only shows the form shortcode and not the form itself. I wasn’t sure what to put as the class after the id=my_form_pop, so I might have that wrong. In a normal page VFB already inserts the ‘visual-form-builder-container’ class while it is processing the shortcode, so I doubt I put the correct class name on that line. Here’s the html for what I have. Can you help me figure out what’s wrong? As I said, only the shortcode is being displayed in the fancybox.

    <div>
    <a class="ActiveShowButton fancybox" href="#my_form_pop">Volunteer at Show</a>
    <div class="fancybox-hidden" style="display:none">
    <div id="my_form_pop" class="visual-form-builder-container" style="width:500px;height:500px;">[vfb id=5]</div>
    </div>
    </div>

    Thanks!

    https://www.ads-software.com/plugins/easy-fancybox/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi vmallder, if you’re seeing the shortcode instead of the form then that means the shortcode did not get processed by Visual Form Builder Pro. FancyBox does not process any content, it just shows content in a lightbox. If that content needs to be processed (like in the case of shortcodes) then that needs to have been done before FancyBox loads it…

    Where did you place this code snippet that you posted above? What happens if you replace the snippet with just the form shortcode [vfb id=5]?

    A link to your site might be helpful.

    Thread Starter vmallder

    (@vmallder)

    Hello RavanH,

    Thank you for getting back to me. Your reply gave me the hint that I needed to figure it out. So, in my php code where I construct the html that is shown in my previous post, I changed one line of code that looked like this:

    $output .= ‘[vfb id=5]’;

    to

    $output .= do_shortcode(‘[vfb id=5]’);

    and now, the form appears in the popup. ??

    Thank you very much, I appreciate your time!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Using Fancybox with Visual Form Builder Pro’ is closed to new replies.