-
AuthorPosts
-
February 12, 2016 at 7:08 pm #582435
I’d llke to have a button that opens a lightbox containing a mailchimp form. I like Enfold’s native Mailchimp form, and I have it on the page. However, for design purposes, I want to also be able to open a form by clicking on a button. That could open either the native enfold mailchimp form or one of mailchimp’s general or embedded forms. Is there a way to do this?
I saw the post https://kriesi.at/support/topic/using-button-shortcode-to-open-a-video-in-a-lightbox/ and tried using <span class=”avia”>Youtube</span> (substituting the real form url, of course. And I just left in the Youtube words during testing.) However, this didn’t open the form. Additionally, I’d prefer the button to look like http://snag.gy/IMozm.jpg
February 12, 2016 at 7:14 pm #582439Hey 1039 Online!
Please turn on debugging mode – http://kriesi.at/documentation/enfold/enable-advanced-layout-builder-debug/ and then create your form and copy its shortcode from the field below ALB. Add Code Block element to your page and then add following code inside it
<a href="#test-popup" class="open-popup-link">Click this button to open form in lightbox</a> <div id="test-popup" class="white-popup mfp-hide"> YOUR SHORTCODE GOES HERE </div>
and then add following code to Quick CSS in Enfold theme options under General Styling tab and adjust as needed
.white-popup { position: relative; background: #FFF; padding: 20px; width: auto; max-width: 500px; margin: 20px auto; }
and finally, add following code to Functions.php file in Appearance > Editor
function add_custom_script(){ ?> <script type="text/javascript"> jQuery(window).load(function(){ jQuery('.open-popup-link').magnificPopup({ type:'inline', midClick: true }); }); </script> <?php } add_action('wp_footer', 'add_custom_script');
Cheers!
Yigit- This reply was modified 8 years, 9 months ago by Yigit.
February 12, 2016 at 7:24 pm #582452Thanks, Yigit!
February 12, 2016 at 7:30 pm #582458 -
AuthorPosts
- The topic ‘Lightbox for mailchimp form’ is closed to new replies.