I was wondering if anyone can help me out with a code for making the custom Text Box on the product page only popping up when a certain variant is selected. I want to offer an optional personalization for my products which is a custom embossing. So I have created a variant Personalization with the select options Yes or No. This is the code I have used for that.
Personalization
I´ve also made the Text Box mandatory/required to be filled out before adding the product into cart. So what I need is the Text Box to appear only when the variant Personalization is selected as Yes (and then the Text Box to be mandatory to be filled out). If the variant Personalization is selected as No, then the Text Box shouldn´t be visible at all (and shouldn´t be mandatory).
Here´s the link to a product so you´d see what I´m talking about.
I’m trying to do something similar but I would like for the text box to appear after a checkmark was used. So I have the checkmark already coded but I have no idea how to have the text box appear after it’s been checked. The checkbox is asking if it’s a gift, and the textbox would ask for a Gift message. Could you help me with that? I tried to simulate what u explained above and shopify broke haha. Thanks in advance.
Hello @joker7 I want a solution something like this. I have size variations in a product like S, M, L & “Custom”. I want to display a custom text box when someone clicks on Custom size variation & hide when clicking on S, M, L, size, etc.
This is my text field code
@Hakelz The solution is in my first comment. If you tried it and it’s not working for you or if you don’t know how to implement it please send me the link to your store so I can take a look at it and help you implement the solution.