We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

How to make personalization fields mandatory before adding to cart?

How to make personalization fields mandatory before adding to cart?

jsbuildco
Excursionist
23 0 3

I have personalization fields marked as required but you can add to cart without completing the fields. How can I change that? 

 

website URL is www.jsbuildcompany.com

Replies 2 (2)

EcomGraduates
Shopify Partner
862 71 126

Hello there

this looks great.  

for  the required you need to add the class required  

 

example: 

  <input type="text" id="username" name="username" required>

 Like + accept if this helped |
 Theme: EcomifyTheme |
️ Get An Audit: Here



jsbuildco
Excursionist
23 0 3

Here's an example of one I have. So this is incorrect? I used the Shopify UI Elements Generator

 

<p class="line-item-property__field">
<label for="personalization-text">Personalization Text</label>
<input required class="required" id="personalization-text" type="text" name="properties[Personalization Text]" style="width: 100%; line-height: 3;">
</p>