I want customers to enter a note before checking out at our store. I have the note customized but want it to be/say “required field” before they check out. How can I accomplish this?
Topic summary
Making the cart note mandatory before checkout. The recommended approach is to add the HTML “required” attribute to the note field (textarea) so the browser prevents submission until something is entered.
Key details:
- Implementation: set the cart note textarea to required (e.g., add required in the tag for name=“note”).
- Behavior: this uses client-side HTML5 validation; it only ensures the field is not empty.
Considerations:
- Without custom validation rules (e.g., minimum length or specific format), customers can enter a single character to proceed.
- Stronger validation would require additional logic, not covered in the thread.
Outcomes:
- Concrete action item provided: edit the theme’s cart note textarea to include the required attribute.
- A screenshot and code example were shared to illustrate the change.
Status:
- Basic solution identified and accepted; enhanced validation remains open/unaddressed.
Add the required attribute to the html input.
Thought without also writing validation rules this can just mean people have to enter a single character to proceed.
