Problem: A cart text field marked as required no longer blocks checkout in Dawn 15.0 (worked in older versions). Code had to be moved from main-cart-items.liquid to main-cart-footer.liquid due to theme architecture changes.
Likely cause: Newer Dawn versions may submit the cart via JavaScript/AJAX, bypassing native HTML required validation.
Recommendations:
Add custom JavaScript validation tied to the checkout button to prevent submission if the field is empty.
Ensure the input is inside the correct cart so attributes are recognized and preserved on updates.
Verify attributes persist after cart changes; re-bind validation if the cart re-renders via AJAX.
Consider using Shopify’s Forms app to collect this information (with analytics) instead of a cart attribute.
Post the issue in the English Experts Forum for broader technical support.
Notes: An image (Forms app analytics) is included but not essential to the fix.
Status: No confirmed resolution in-thread. Issue acknowledged as commonly reported after Dawn updates; guidance provided, discussion open.
Summarized with AI on December 21.
AI used: gpt-5.
Hello,
Even though I’ve set the required attribute and class on the input field, customers can still proceed to checkout without filling it out.
<div class="form-vertical">
<p>
<label id="how-did-you-hear-about-us-other--label" for="how-did-you-hear-about-us-other">How did you hear about us?</label>
<p>How did you hear about us?</p>
<span id="how-did-you-hear-about-us-other--error" style="display:none">{{ settings.hau_error_message_other }}</span>
<input required class="required" id="how-did-you-hear-about-us-other" type="text" name="attributes[how-did-you-hear-about-us-other]" value="{{ cart.attributes.how-did-you-hear-about-us-other }}" placeholder="Required field"/>
</p>
</div>
The script worked in older versions of the Dawn theme. Since version 15 (probably earlier) it no longer works. But there also seem to have been changes to the architecture, as I had to move the code from main-cart-items.liquid to main-cart-footer.liquid.
Thanks for that but you are in the German community here. You sure you don’t want to post it in the EN Experts Forum here? And are you not working with our Forms App that can do all that? With it you also get stats and analytics as to the CTRs of your form:
The issue with the required attribute in cart fields seems to be a known unknown among Shopify users. Several users have reported similar problems, particularly when migrating or updating to newer versions of the Dawn theme. Some noticed that custom fields and attributes, which used to work in previous versions of Dawn, stopped functioning correctly in the latest updates. This often happens because the newer versions of the theme may handle form submissions differently, possibly using AJAX or other methods that bypass traditional HTML form validation (Shopify Community).
JavaScript Validation: The most common solution recommended is to implement custom JavaScript validation. Since the HTML required attribute might not be respected due to the theme’s changes, adding a script that checks the field before the checkout process is a reliable workaround. Users have reported success by binding a validation script to the checkout button to prevent submission if the field is empty. Correct Placement of Code: It’s crucial to ensure that any custom fields or attributes are correctly placed within the form element that Shopify uses for cart operations. Misplacement of code, especially when updating the theme, can lead to fields not being recognized or validated properly (Shopify Community).
Some specific issues noted in the community include attributes not being retained after cart updates or not displaying correctly on the checkout page. This can often be traced back to how the theme handles form submissions and page reloads (Shopify Community).
Hope you will find a solution and have a great weekend!