Custom input field to show when certain option value is selected

Hi all,

I was wondering if you can help and point me in the right direction.

I have some items that require personalisation. I have created a text input box for personalisation, however, I only want this to show up when a product item that has personalisation as “Yes” in its variation.

See image below:

The code I currently have in product-template-custom.liquid is:


Option name: Personalisation
Option values: Yes, No

I hope that you can help

Hi @samuelbreezey

You would need JS to get this done, it won’t work through Liquid if user cycles back between Yes & No. What theme are you using?

Thank you, I am using Brookyln

Here is the website: https://bridesandbabes.myshopify.com

haohao