Dawn theme - Custom product form properties not adding when input type is not a radio

ElyseGiroux
Shopify Partner
1 0 0

Hello, I've been having an issue occurring on code that worked perfectly up until this point.

 

I have 3 custom properties when products have a specific tags.

 

A select, a radio and a text input.

 

The radio work perfectly fine, but the select and input will only sometimes add the line item to cart and order.

 

In some occurrences, I've seen the empty line item property in my cart and orders, while other time it just plainly won't add it.

 

Here's my code:

 

 

 

       <label for="police">Choix de la police (Voir Image)</label>
       <select form="product-form-{{ section.id }}" id="police" name="properties[Police]">
         <option value=""></option>
         <option value="A">A</option>
         <option value="B">B</option>
         <option value="C">C</option>
         <option value="D">D</option>
         <option value="E">E</option>
         <option value="F">F</option>
         <option value="G">G</option>
         <option value="H">H</option>
         <option value="I">I</option>
       </select>

        <label>Choix de la couleur</label>
        <div>
          <input form="product-form-{{ section.id }}" type="radio" id="couleur-blanc" name="properties[Couleur]" value="Blanc">
          <label for="couleur-blanc"></label>
  
          <input form="product-form-{{ section.id }}" type="radio" id="couleur-noir" name="properties[Couleur]" value="Noir">
          <label for="couleur-noir"></label>                          
        </div>

       <label for="monogram">Votre texte ou mot ici (Si applicable) </label>
       <input form="product-form-{{ section.id }}" id="monogram" type="text" name="properties[Monogram]">

 

 

 

I've also tested switching the select to a radio and magic! It worked.

I'm really looking to keep a dropdown there however and the text input still isn't working.

 

Any advices is appreciated, thank you 🙂

Replies 0 (0)