Re: Enable/Disable submit button from Checkout extension

Enable/Disable submit button from Checkout extension

WildData
Shopify Partner
20 1 5

Hi,
I'm developing a checkout extension. It's just a mandatory checkbox that the user needs to check in order to complete the order.
I want to be able to either:

- enable/disable the submit button on the checkout page when this box gets checked/unchecked

- prevent checking out when the user clicks the submit button if the checkbox hasn't been checked.


Thanks

Replies 3 (3)

Liam
Community Manager
3108 341 880

Hi WildData,

 

If you're looking to adjust the logic of how the checkout works (preventing checkout based on conditions) then I believe you'll need to create a Shopify Function to achieve this. Have you looked into functions yet?

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

sowndharya
Shopify Partner
9 0 3

Same here. Found any solution @WildData 

TheXavvyApe
Shopify Partner
2 0 0

I don't think disabling the button would work. You can, however, use Block checkout progress so that the customer won't push through the submit or payment button when they haven't ticked the checkbox.