How do I create a checkbox list on a product page?

LetterCreative
New Member
1 0 0

Hi!

I am using the Minimal theme. My product is vegetable boxes for the community. I want to create a product page where there is a list of items and the customer ticks the ones they want included in their box. Then on my order dashboard it will show me what items they ticked. 

 

For example

Carrots (tick box)

Potatoes (tick box)

Apples (tick box)

 

I can't find a tutorial on this - can someone send me the instructions on how to make a template? 

 

Thanks so much!

Carrie

0 Likes
ikolarov
Shopify Partner
101 17 23

Hi @LetterCreative 

 

You can use the following site to generate an HTML code for your checkboxes if you are not well versed in liquid: https://ui-elements-generator.myshopify.com/pages/line-item-property

 

Once you generate your checkbox HTML code you will need to paste it in your `{% form 'product' %}`.

 

---

 

If you have a basic understanding of HTML you only need this:

 

<input id="your-name" type="checkbox" name="properties[Your name]" value="Yes">
<label for="your-name">Your name</label>

 Where the important bit is the `name="properties[Your name]"` where you can change the string `Your Name` to Carrots for example. 

 

Here is an example how will the Carrots checkbox look:

 

<label for="carrots">Carrots</label>
<input id="carrots" type="checkbox" name="properties[Carrots]" value="Yes">
0 Likes
SoyStories
Excursionist
12 0 4

@LetterCreative i have this code in my theme, Narrative. But i cannot get the options choosen to show in the Cart. are you able to help please

euri_23
Tourist
7 0 0

same :'(

0 Likes
autostone
Tourist
21 0 1

Did you ever receive a reply? We are wanting something like this as well.

0 Likes
euri_23
Tourist
7 0 0
Yeah you’ll have to use an app for product options there are lot of apps
that provide that option but of course you will have to pay. I use an app
called dynamic product options and pay $19.99 a month and it works really
good, I have tried looking for cheaper ones but they didn’t integrate well.
0 Likes