Re: Required Personalization Field

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
735 63 105

Hello there

this looks great.  

for  the required you need to add the class required  

 

example: 

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

If this fixed your issue, likes and accepting as a solution are highly appreciated.

Build an online presence with our custom built Shopify Theme EcomifyTheme




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>