What are you using to launch the lightbox?
I’m making an assumption based on what I can see on your site. Under the “Forms” heading, you have a number of forms listed as text on the page. Should these be links to open the individual form? or do you have those links in another place?
If they should be the link to open the form, you will want to build your link in the following manner (in place of the text):
<a href="#fancyboxID-1" class="fancybox-inline">Pet Care Service Agreement</a>
I found that I had to configure each link with it’s own <a>
and <div>
to get it to work the way I intended. I have 7 different forms that I display, and with that comes 7 different <div>
and 7 different <a>
configurations. I build the <a>
on the fly replacing the ? “#fancyboxID-?” with the form number and then match it in the <div id ="fancyboxID-?">
with the form number as well. Your forms are static, so you won’t have to build the links on the fly.
When that link is clicked on, it will fire off the code below:
<div style="display:none" class="fancybox-hidden"><div id="fancyboxID-1" style="width:800px;height:425px">
<?php
$gfsc = '[gravityform id="1" ajax="true"]';
echo do_shortcode($gfsc);
?>
</div></div>
I apologize that I previously stated you needed to do “iframe”, when in fact it is “inline”.
If I remember correctly, I struggled with this as well.
I have my link attached to a button image instead of a straight link, but it should work the same.