"required field" not working on cart footer

Topic summary

Problem: Two custom cart inputs marked “required” block checkout when placed in main-cart-items.liquid, but stop working when moved below the subtotal in main-cart-footer.liquid.

Code: The inputs use the HTML required attribute (e.g., <input required … name=“attributes[Your Contact No.]”>).

Proposed fix: Remove the novalidate attribute from the cart’s form tag. novalidate disables the browser’s HTML5 validation, causing required fields to be ignored.

Status: The original poster asked where to find novalidate, noting they only used code from a custom field generator. No resolution or confirmation yet.

Action item: Locate the cart page’s form element in the theme and check for a novalidate attribute; if present, remove it. Discussion remains open pending guidance on where to edit the form tag.

Summarized with AI on January 15. AI used: gpt-5.

Hi all,

I have added two custom field on my cart page “your name” and “your contact no.” and it is supposed to be a required field.

When I add the codes to the main-cart-items.liquid file, the required fill works. It will not allow me to proceed to the checkout page if i did not fill in the fields.

However, I would prefer the “your name” and “your contact no.” to appear below the subtotal which I had to add the codes to the “main-cart-footer.liquid” file instead. After adding the custom field box here, the “required” function is not working. I can proceed to the checkout page without filling in these two fields.

This is how my code looks like:

Your Contact No.

Does anyone knows how to fix this issue?

Remove novalidate attribute from the the form tag

Hi Asad24,

Where do I find the novalidate attribute?

The code is the only thing I got from the custom field generator site.