designfordummies Posted June 5 Posted June 5 Looking to embed Calendly events (using Calendly-provided code) into List Item Buttons. Does anyone have a clue how to achieve this? The only options for the buttons are links or files. Site: nslive.us/presentation-scheduling
melody495 Posted June 5 Posted June 5 Hi @designfordummies, what do you want the button to do once clicked? One option is to use the link, so when clicked on, it opens the Calendly event in a new browser. -------- > 👆 <---------- Please quote or @ me when replying, or I won't get a notification Melody | Web Designer & Developer | All things Squarespace When I have time, I like to help on the Forum, but if you need my full attention, please send your request here. Tools I use: (affiliate links) 📅Blog Date Format plugin (Free by BeyondSpace) ⏬Lazy Load Summary Block plugin (by Squareswebsites) 📜Privacy Policy & Cookie Consent plugin (10% off by Termageddon) 📈SEO plugin for Squarespace (by SEOSpace) ☕ Did I help? I like coffee (Thank you)
designfordummies Posted June 5 Author Posted June 5 I'd like the Calendly pop up to open in a lightbox like it normally would if I embedded it into a code block. This is the code Calendly provided for a pop-up text link: <!-- Calendly link widget begin --> <link href="https://assets.calendly.com/assets/external/widget.css" rel="stylesheet"> <script src="https://assets.calendly.com/assets/external/widget.js" type="text/javascript" async></script> <a href="" onclick="Calendly.initPopupWidget({url: 'https://calendly.com/nslive/markerboardceu'});return false;">Click to Schedule</a> <!-- Calendly link widget end --> All scheduling needs to remain on the site, not redirect to Calendly.
tuanphan Posted June 6 Posted June 6 #1. First, add Calendly code to Page Header Code Injection (Page where you use List Section) it will appear on top of page #2. Use this code to Custom CSS box a[onclick*="Calendly"] { position: fixed; z-index: 99999; left: 30px; bottom: 30px; visibility: hidden; } #3. Edit List Section Button > Add this URL to button. and make sure "Open in New Tab" option is disabled #4. Add this code to Page Header Code Injection, under Calendly code you added in #1. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script> <script> $(document).on('click', 'a[href="#Calendly"]', function(event) { event.preventDefault(); $('a[onclick*="Calendly"]').click(); }); </script> #5. Result When clicking List button (Learn more button), Calendly Popup will appear. Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
designfordummies Posted June 6 Author Posted June 6 Thank you so much @tuanphan. However, clicking isn't activating the pop up. Did I plug everything in correctly? See screenshots attached.
designfordummies Posted June 6 Author Posted June 6 Hold on replying to that. After trying in an incognito window it works great.
designfordummies Posted June 6 Author Posted June 6 @tuanphan If I want to connect different calendly links to each appropriate list item button, would I simple repeat the code in the page header injection and change URL's within as needed?
tuanphan Posted June 10 Posted June 10 On 6/7/2024 at 4:40 AM, designfordummies said: @tuanphan If I want to connect different calendly links to each appropriate list item button, would I simple repeat the code in the page header injection and change URL's within as needed? I haven't tested this yet (I havent used Calendly, so I'm not sure how it will generate the id), so if you can share some calendly items code, I can test easier. Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
designfordummies Posted June 10 Author Posted June 10 @tuanphan Site link: https://nslive.us/presentation-scheduling Here are a few of the snippets (I'll have 9 total): CEU: WRITABLE SURFACES FOR MODERN INTERIORS <!-- Calendly link widget begin --> <link href="https://assets.calendly.com/assets/external/widget.css" rel="stylesheet"> <script src="https://assets.calendly.com/assets/external/widget.js" type="text/javascript" async></script> <a href="" onclick="Calendly.initPopupWidget({url: 'https://calendly.com/nslive/markerboardceu'});return false;">Schedule time with us</a> <!-- Calendly link widget end --> CEU: ACOUSTICS AND THE MODERN HUMAN <!-- Calendly link widget begin --> <link href="https://assets.calendly.com/assets/external/widget.css" rel="stylesheet"> <script src="https://assets.calendly.com/assets/external/widget.js" type="text/javascript" async></script> <a href="" onclick="Calendly.initPopupWidget({url: 'https://calendly.com/nslive/acousticsceu'});return false;">Schedule time with us</a> <!-- Calendly link widget end --> SOLACE <!-- Calendly link widget begin --> <link href="https://assets.calendly.com/assets/external/widget.css" rel="stylesheet"> <script src="https://assets.calendly.com/assets/external/widget.js" type="text/javascript" async></script> <a href="" onclick="Calendly.initPopupWidget({url: 'https://calendly.com/nslive/solace-update-10-min'});return false;">Schedule time with us</a> <!-- Calendly link widget end --> DEKO <!-- Calendly link widget begin --> <link href="https://assets.calendly.com/assets/external/widget.css" rel="stylesheet"> <script src="https://assets.calendly.com/assets/external/widget.js" type="text/javascript" async></script> <a href="" onclick="Calendly.initPopupWidget({url: 'https://calendly.com/nslive/deko-update-10-min'});return false;">Schedule time with us</a> <!-- Calendly link widget end -->
designfordummies Posted June 11 Author Posted June 11 @tuanphan Any luck with this request? Appreciate your efforts.
tuanphan Posted June 13 Posted June 13 I don't check notifications but check questions from old pages and earlier. Your post was pushed to the front page so I didn't see it. I will check and let you know in the next 1-3 days. Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
Solution tuanphan Posted June 13 Solution Posted June 13 Remove all steps you followed above Next, follow step #1, #2 above with step #3, Edit List Item buttons, enter these urls to buttons #marketboardceu #acousticsceu #solace #deko Next, paste this code to Page Header Code Injection or Code Injection > Footer <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script> <script> $(document).on('click', 'a[href="#marketboardceu"]', function(event) { event.preventDefault(); $('a[onclick*="markerboardceu"]').click(); }); </script> <script> $(document).on('click', 'a[href="#acousticsceu"]', function(event) { event.preventDefault(); $('a[onclick*="acousticsceu"]').click(); }); </script> <script> $(document).on('click', 'a[href="#solace"]', function(event) { event.preventDefault(); $('a[onclick*="solace"]').click(); }); </script> <script> $(document).on('click', 'a[href="#deko"]', function(event) { event.preventDefault(); $('a[onclick*="deko"]').click(); }); </script> Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
designfordummies Posted June 14 Author Posted June 14 Worked out great. Thank you @tuanphan! tuanphan 1
tuanphan Posted June 15 Posted June 15 If you need code for 9 buttons, you can send 9 code, I will give code for all. Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment