Hide or show Custom Text Box Based On Selected Variant Dawn Theme Variant Pills

2 0 1

I use dawn theme and use the standard variants that Shopify offers. I want to have a text field and a drop down menu to be shown when the the second variant pill is selected. When the first variant pill is selected, the text field and the drop down menu should be hided. I don´t know how to implement this logic and where I have to put the code... I am searching for a solution for over 2 months now 😞

I would be very happy if anyone could help me 🙂




Replies 4 (4)
Shopify Partner
1397 131 151

Hi @porsche334 ,


To achieve this you should create a metafield at variant level type of true/false then custom code in theme.


To hide show the input field.


Hope it will help...

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | YouTube Videos
To support Buy Me a Coffee
2 0 1

Thank you for your answer 🙂 can you tell me what the custom code would look like ? 

Shopify Partner
3785 710 1096

Hi @porsche334 


You have to listen to the customer's input. A liquid or html code will not be enough to do this. Unfortunately, you need a developer to write the javascript code for this.

Volunteering to assist you!  Likes and Accept as Solution  is highly appreciated.✌
Coffee fuels my dedication. If helpful, a small Coffee Tip would be greatly appreciated.
Need EXPERIENCED Shopify developer without breaking the bank?
Hire us at Made4Uo.com for quick replies.
Stay in control and maintain your security by avoiding unnecessary store access!
Shopify Partner
581 13 34

Hi @porsche334,

Could you give me some info about your product, like its options and variants? And how do you handle its inventory? Also, if you could let me know how many products in your store need that custom text field and dropdown, I can give you some advice 🤗.

Easify Product Options: Create custom product options 10X faster & easier!
Easify Product Attachments: Effortlessly add downloadable PDF files (or any other format) to Shopify pages!
Try for Free | 24/7 Live Chat Support