Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Help!
I have added 4 text box fields to my shopping cart to collect a little more information from my customers and am having trouble making these text boxes a required field before moving into the Checkout.
<div class="line-item-property__field">
<Form></Form><p class="line-item-property__field" style="width: 45%;">
<label for="Student's-name">Student's Name</label>
<input required class="required" id="Student's-name" type="text" name="properties[Student's-name]">
</p>
<p class="line-item-property__field" style="width: 45%;">
<label for="Teacher's-name">Teacher's Name</label>
<input required class="required"id="Teacher's Name" type="text" name="properties[Teacher's Name]">
</p>
</div>
<div class="line-item-property__field-group">
<p class="line-item-property__field" style="width: 60%;">
<label for="Grade">Grade</label>
<input required class="required" id="Grade" type="text" name="properties[Grade]">
</p>
<p class="line-item-property__field" style="width: 30%;">
<label for="School">School</label>
<input required class="required" id="School" type="text" name="properties[School]">
</p></form>
</div>
</div>
I did fix the code you provided. Please replace your code with the code below. Also, if you visit our website, you should be able to utilize our free Shopify UI generator tool.
<form>
<div class="line-item-property__field">
<p class="line-item-property__field" style="width: 45%;">
<label for="students-name">Student's Name</label>
<input required class="required" id="students-name" type="text" name="properties[Student's-name]" form="cart">
</p>
<p class="line-item-property__field" style="width: 45%;">
<label for="teachers-name">Teacher's Name</label>
<input required class="required" id="teachers-name" type="text" name="properties[Teacher's Name]" form="cart">
</p>
</div>
<div class="line-item-property__field-group">
<p class="line-item-property__field" style="width: 60%;">
<label for="grade">Grade</label>
<input required class="required" id="grade" type="text" name="properties[Grade]" form="cart">
</p>
<p class="line-item-property__field" style="width: 30%;">
<label for="school">School</label>
<input required class="required" id="school" type="text" name="properties[School]" form="cart">
</p>
</div>
</form>
Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
I am trying to add 4 customer notes fields or text boxes to my Taste Theme cart that will be required to checkout. I will need the information from these boxes to show up on the order. Any idea how I do this? I can make the boxes show up in the cart but the information doesn't come through on the order and the customer can move into the checkout screen without filling these out.
Hey! I'm looking for the same result, did you ever figure it out?
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024