Code advice for variations / text boxes

Hello, I am hoping someone can help me, I am hoping it is possible to have a text box appear only if a customer selects a variation. This would be for a message inside a greetings card, if the customer selected ’ yes please’ on my variations I would like this box to be visible. But not if the select no thank you.

I am using the Dawn theme and the text box is coded into the design using the custom liquid feature on the website editor. The code currently being used is;

If you have selected to add a message inside the card it can be left here

https://www.pmprinted.co.uk/products/wife-i-have-really-enjoyed-annoying-you-20025

Hey @PMPrinted

This type of work is not only possible and requires JS and liquid coding in your theme files so if you’re not familiar with coding then I suggest you to hire a Shopify developer who can help you out with that. Feel free to let me know if you want me to help you out and I would be more than happy to help you out.

Best Regards,

Moeed

Thank you I thought that maybe the case. I am busy designing the website so will add to the list of things I am out of my depth on!

Hi @PMPrinted ,

Can I send you a collaborator invite? it will help me to check and add JS code for this

Hi @PMPrinted this requires an advanced theme customiation.

An alternative is just make these separate products using alternate templates.

https://help.shopify.com/en/manual/online-store/themes/os20/theme-structure/templates#create-a-new-template

Then shift where in the user journey a customer makes that choice.

Such as adding links/buttons in both templates to send the customer between the two products.

Or a collection or page as the landing page ,etc

If you need this customization then contact me for services
Contact info in forum signature.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.