I am using Easy Fancy Box to open a Gravity Form in a directory on a WordPress website I am building. I was waiting for the Pro Version but can't wait any longer so am using the free version downloaded from the repository.
This is the code I have in my directory template, single-directory.php as I am using a cpt with Advanced Custom Fields for this project. This is on a Multi-Site..
<div style="display:none" class="fancybox-hidden"> <div id="fancyboxID-<?php echo $i;?>" class="hentry" style="width:600px;height:400px;"> <?php $staff_email = get_field('email'); $field_values=array('staff_email' => $staff_email ); gravity_form(2, false, false, false, $field_values, true); ?> </div> </div> <?php $i++; ?>
This is the link I use to popup the fancy box.
<div class="staff-directory-email"><h6><a href="#fancyboxID-<?php echo $i;?>" class="fancybox-inline">Contact Us</a></h6></div>
I am having two problems. When the submit button for the email form is clicked on it takes a long time for the form to actually submit. If I put the form in a regular page the submission is fast, so it has something to do with my code or the way I am using it in Easy Fancy Box.
Second problem is once it is submitted and the confirmation message is display, if I close the popup and then decided to send a second message the popup still shows the confirmation message instead of resetting back to the form.
Any help would be appreciated.