Checkboxes in contact form

Justin9
Shopify Partner
30 0 0
  <!-- Question checkbox -->
            <div class="question-box">
                <label class="label-title">Here comes the question...</label><br><br>
                <input type="checkbox" id="1" name="contact[Situatie]" value="1" /><span>Hairloss</span><br>
                <input type="checkbox" id="2" name="contact[Situatie]" value="2" /><span>Dandruff</span><br>
                <input type="checkbox" id="3" name="contact[Situatie]" value="3" /><span>Dry hair</span><br>
                <input type="checkbox" id="4" name="contact[Situatie]" value="4" /><span>Oily hair</span><br>
                <input type="checkbox" id="5" name="contact[Situatie]" value="5" /><span>Psoriasis</span><br>
                <input type="checkbox" id="6" name="contact[Situatie]" value="6" /><span>Itchy</span><br>
                <input type="checkbox" id="7" name="contact[Situatie]" value="7" /><span>Bald spots</span>
            </div>

Hello everyone,

I am making some kind of 'product advice' form for my customers. They have to fill in a couple of questions (radio boxes, checkboxes, open questions) so that I know what product would be the best for their concern.

One question gives them the possibility to check multiple boxes (checkboxes). However, when I get the email with answers, only the data of the last checked checkbox will come through.

How can I get the data of all checked checkboxes in the email and not only the last one?

Thank you very much,

Justin
 

E-Commerce Enthusiast
0 Likes
Justin9
Shopify Partner
30 0 0

I know I could change the name (name="contact[Situatie]") to make them all seperate but this doesn't look professional in the email.

I am aware of this solution and am wondering if there's another one.

E-Commerce Enthusiast
0 Likes
Lars_Ahlgren
New Member
1 0 0

I am interested in exactly the same solution. When I tried it the first time, I assumed the default behaviour from Shopify would be to list all of the selected checkboxes in one field on the email that's received, but that's not what happens.

 

0 Likes
webserviceXXL
Shopify Expert
4 0 1

I have the same problem and it seems the mail template of Shopify still does the same. As far as more then one checkbox ist checked the mail body online contains the last option. This solution is a standard HTML element. So I guess Shopify should respect form objects like this.

 

Any ideas?

0 Likes
Zach_Z
New Member
1 0 0

Hello Justin,

 

I'm having the same exact issue, I did try your solution by changing the name & placing (). Though when I tried that solution for myself, the question nor the checkbox answers didn't even show in the email. 

 

Any Thoughts?

 

Best Regards, 

Zach Z.  

0 Likes
crownthegoat
New Member
3 0 0

Hello, I have been trying to search how to align my checkbox section in the contact form. You can see the issue below in the photo. If anyone can assist me that would be much appreciated! 

contactform.JPG

0 Likes