Required field in checkout extension doesnt work

Solved

Required field in checkout extension doesnt work

kristinam
Shopify Partner
5 0 0

Hi there,

 

I have created a checkout extension to add a new field at checkout. And added client side validation with

behavior: "block". That works perfectly fine on development site. But when pushing to production, it fails - the new field just doesn't show up as required and has no validation. Any ideas what may be wrong there? Thanks
Accepted Solution (1)

Liam
Community Manager
3108 341 878

This is an accepted solution.

Hi Kristinam,

 

The issue might be related to the `block_progress` capability. Even if you have added the `block_progress` capability to your `shopify.ui.extension.toml` file, the merchant can allow or disallow this capability in the checkout editor. In development mode, you're automatically granted the `block_progress` capability as long as it's set in your `shopify.ui.extension.toml` file.

 

However, in the production environment, the merchant has to manually allow this capability. First doublecheck that the `block_progress` capability is included in your `shopify.ui.extension.toml` file, and when you push to production on a test store ensure that you've enabled the `block_progress` capability in the checkout editor.

 

Hope this helps!

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

View solution in original post

Reply 1 (1)

Liam
Community Manager
3108 341 878

This is an accepted solution.

Hi Kristinam,

 

The issue might be related to the `block_progress` capability. Even if you have added the `block_progress` capability to your `shopify.ui.extension.toml` file, the merchant can allow or disallow this capability in the checkout editor. In development mode, you're automatically granted the `block_progress` capability as long as it's set in your `shopify.ui.extension.toml` file.

 

However, in the production environment, the merchant has to manually allow this capability. First doublecheck that the `block_progress` capability is included in your `shopify.ui.extension.toml` file, and when you push to production on a test store ensure that you've enabled the `block_progress` capability in the checkout editor.

 

Hope this helps!

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