atownwings Posted March 9, 2021 Share Posted March 9, 2021 (edited) Site URL: https://www.atownwings.com/columbus Is there a way to insert a checkbox that must be checked in order for a button to be unlocked? Example: ☐ I agree I am ordering from the xxxx location. (Order Online button) The order button would only be clickable when the user checks the box. Edited March 9, 2021 by atownwings Clarification Beyondspace 1 Link to comment
Beyondspace Posted March 9, 2021 Share Posted March 9, 2021 3 minutes ago, atownwings said: Site URL: https://www.atownwings.com/columbus Is there a way to insert a checkbox that must be checked in order for a button to be unlocked? Example: ☐ I agree I am ordering from the xxxx location. (Order Online button) The order button would only be clickable when the user checks the box. You can place the checkbox as required value in product form lightbox, it won't allow to add to cart if button not checked atownwings 1 BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox) 🗓️ Delivery Date Picker (Squarespace Date format) 💫 Animated Buttons (Referral URL) 🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations) 🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates) If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you! Link to comment
atownwings Posted March 9, 2021 Author Share Posted March 9, 2021 6 minutes ago, bangank36 said: You can place the checkbox as required value in product form lightbox, it won't allow to add to cart if button not checked Thanks for the quick reply. How do I do this? It is not a product—the button links to a third-party page where the customer can place an online order. Beyondspace 1 Link to comment
Beyondspace Posted March 9, 2021 Share Posted March 9, 2021 27 minutes ago, atownwings said: Thanks for the quick reply. How do I do this? It is not a product—the button links to a third-party page where the customer can place an online order. Oh I see, so the code block can help. Add this to Site Design->Custom css .order-online-block { text-align: center; } .order-online-block [class*='sqs-block-button-container'] { margin-top: 10px; pointer-events: none; opacity: 0.7; } .order-online-block input:checked + label + [class*='sqs-block-button-container'] { pointer-events: auto; opacity: 1; } And add new code block where you place the button <div class="order-online-block"> <input type="checkbox" id="location-confirm" name="location-confirm" value="location"> <label for="location-confirm"> I agree I am ordering from the xxxx location.</label> <div class="sqs-block-button-container--center" data-animation-role="button" data-alignment="center" data-button-size="large" id="yui_3_17_2_1_1615252679288_72"> <a href="https://www.micropay-online.com/ordering/restaurant/menu?restaurant_uid=ceece2e1-cd66-4625-a3cb-570b5ad87d83" class="sqs-block-button-element--large sqs-block-button-element" data-initialized="true">Columbus, GA Online Order</a> </div> </div> tuanphan and atownwings 1 1 BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox) 🗓️ Delivery Date Picker (Squarespace Date format) 💫 Animated Buttons (Referral URL) 🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations) 🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates) If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you! Link to comment
atownwings Posted March 9, 2021 Author Share Posted March 9, 2021 3 minutes ago, bangank36 said: Oh I see, so the code block can help. Add this to Site Design->Custom css .order-online-block { text-align: center; } .order-online-block [class*='sqs-block-button-container'] { margin-top: 10px; pointer-events: none; opacity: 0.7; } .order-online-block input:checked + label + [class*='sqs-block-button-container'] { pointer-events: auto; opacity: 1; } And add new code block where you place the button <div class="order-online-block"> <input type="checkbox" id="location-confirm" name="location-confirm" value="location"> <label for="location-confirm"> I agree I am ordering from the xxxx location.</label> <div class="sqs-block-button-container--center" data-animation-role="button" data-alignment="center" data-button-size="large" id="yui_3_17_2_1_1615252679288_72"> <a href="https://www.micropay-online.com/ordering/restaurant/menu?restaurant_uid=ceece2e1-cd66-4625-a3cb-570b5ad87d83" class="sqs-block-button-element--large sqs-block-button-element" data-initialized="true">Columbus, GA Online Order</a> </div> </div> Wow! That worked perfectly. Thank you for your quick, helpful, and concise response. The best! Beyondspace 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