atownwings Posted March 9, 2021 Share Posted March 9, 2021 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. 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 BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - Lightbox captions only mode) 🗓️ Delivery Date Picker (Squarespace Date picker form field) 💫 Gallery block 7.1 workaround 🥳 No-code customisations for Squarespace 🚀 Learn how to rank new pages on Google in 48 hours! 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. 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> BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - Lightbox captions only mode) 🗓️ Delivery Date Picker (Squarespace Date picker form field) 💫 Gallery block 7.1 workaround 🥳 No-code customisations for Squarespace 🚀 Learn how to rank new pages on Google in 48 hours! 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! Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.