Hello friends,
I am really hoping someone out there has a solution to this problem by now. I have read countless older posts that seemed to dead-end without resolution.
I would like to add some REQUIRED fields and buttons to my store. I have added some customization fields to my product pages, as well as a radio-button on the cart page. Using Shopify’s UI Elements Generator, I am easily able to create and insert these fields into the desired pages.
HOWEVER. Even when the generated code is set to be “required,” and indeed contains the lines
input required class="required"
within the code, the functional fields/buttons on the page are NOT in fact required. End-users can still add products and continue to checkout without filling or selecting the buttons.
For example, the entire code supplied to me by the Shopify UI Elements Generator > Cart Attributes is as follows:
<p class="cart-attribute__field">
<label>Love your mother? Save some plastic ?</label><br>
<input required class="required" type="radio" name="attributes[Love your mother? Save some plastic ?]" value="Retail packaging not needed"{% if cart.attributes["Love your mother? Save some plastic ?"] == "Retail packaging not needed" %} checked{% endif %}> <span>Retail packaging not needed</span><br>
<input required class="required" type="radio" name="attributes[Love your mother? Save some plastic ?]" value="Retail packaging preferred"{% if cart.attributes["Love your mother? Save some plastic ?"] == "Retail packaging preferred" %} checked{% endif %}> <span>Retail packaging preferred</span><br>
</p>
When this code is added to the main-cart-footer.liquid, it does indeed display the desired radio button choices, but the selection is not required to click through to the Checkout page.
Really hoping someone out there has finally solved this problem. I am using Dawn 7.0.0 but can upgrade to 9.0.0 if it would help. Cheers