nickcharliekey Posted January 11, 2022 Share Posted January 11, 2022 Site URL: https://www.signaturesmiles-nc.com/request-appointment-1 Hello! I'm trying to install the following widget code script but it's not working in the code block. The company's tech support says it's a plug and play solution and that they have lots of SQSP users but I can't seem to make it work. Any help would be much appreciated: <script src="https://d3ivs86j8l3a5r.cloudfront.net/flexBook.js"></script> initFlexBook('https://flexbook.me/sigsmiles') Link to comment
nickcharliekey Posted January 11, 2022 Author Share Posted January 11, 2022 @tuanphan are you able to assist me with this? Link to comment
tuanphan Posted January 12, 2022 Share Posted January 12, 2022 It looks like the code is missing. Where did you get the code? Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
nickcharliekey Posted January 12, 2022 Author Share Posted January 12, 2022 @tuanphanThanks so much for replying...it's not currently on the page as it's not working in the code block, embed block or header page injection.. Got it from a company called Flex who do dental appointment scheduling. They seem to say its a plug and play solution but it doens't work. I'll readd it to the page so you can see how its interacting. Link to comment
tuanphan Posted January 13, 2022 Share Posted January 13, 2022 16 hours ago, nickcharliekey said: @tuanphanThanks so much for replying...it's not currently on the page as it's not working in the code block, embed block or header page injection.. Got it from a company called Flex who do dental appointment scheduling. They seem to say its a plug and play solution but it doens't work. I'll readd it to the page so you can see how its interacting. I think this code (in red box) should have an opening & closing tag (something like this <script>initFlexBook('https://flexbook.me/sigsmiles');</script>) Can you check again? nickcharliekey 1 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
nickcharliekey Posted January 13, 2022 Author Share Posted January 13, 2022 @tuanphan Thank you so much! Yes that has worked. However it forces a popup on page load, is there anyway to make it open on a click, either by button or have it appear in an iframe perhaps? Not sure if that's even possible. Thanks again, you truly are a forum hero! Link to comment
Solution paul2009 Posted January 13, 2022 Solution Share Posted January 13, 2022 (edited) 1 hour ago, nickcharliekey said: it forces a popup on page load, is there anyway to make it open on a click, either by button or have it appear in an iframe perhaps? Yes, you should be able to do either of these! iframe To use an iframe, simply add the link (https://flexbook.me/sigsmiles) to some simple iframe code inside a Code Block. You won't need the rest of the code that you quoted above. For example, this should be all you need: <iframe src="//flexbook.me/sigsmiles" width="100%" height="985px" style="border:none;"> </iframe> Click button To launch the popup from a button in the header, add a new 'Link" to the navigation in the same position (replacing the page). You can remove the code block. Set the URL of the new navigation link to "#". Then you'll need to add a few lines of code to Settings > Advanced > Code Injection > Footer: <script src="https://d3ivs86j8l3a5r.cloudfront.net/flexBook.js"></script> <script> apptBtn = document.querySelector(".horizontal-navigation-bar nav > ul > li:last-child"); apptBtn.addEventListener("click", function() { initFlexBook('https://flexbook.me/sigsmiles') }); </script> Once saved, this should launch the popup like this: Note: Like all the code posted on this forum, this is a simplified example. It has been provided without warranty. For a supported solution from a professional developer, I recommend booking a Squarespace Expert. Edited January 13, 2022 by paul2009 tuanphan 1 About: Squarespace Circle Leader since 2017. I value honesty, transparency, diversity and great design ♥.Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™. Content: Links in my posts may refer to SF Digital products or may be affiliate links. Catch up on all the release notes and announcements 2023 [for Circle members only]. There's a public version here too!If I helped, you can thank me by clicking one of the emojis below. If you prefer, you can buy me a coffee.Improve your online store with our extensions. Link to comment
nickcharliekey Posted January 13, 2022 Author Share Posted January 13, 2022 @paul2009 You're a legend, thank you so much! This is so incredibly helpful. paul2009 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment