How can I fix variant customization issues with the Dawn theme?

Hi there! I’m trying to edit the Dawn theme code to add a functionality to the variant color options, so that when a color option ‘Custom’ exists and is selected by the customer, a small input text box will show beneath the button and the customer can write in their color selection.

I have been testing some liquid code in the ‘product-variant-picker.liquid’ theme file (shown below) and I’m trying to work out what I have wrong. I’ve been troubleshooting but can’t get the html to render correctly on the product page when the ‘Custom’ option is selected. Any advice is much appreciated!

{% for variant in product.variants %}
{% if variant.title == ‘Custom’ and variant.selected %}

Custom color

{% endif %}
1 Like

Hi @syd-clickworks

Liquid code does not works if you need customers inputs. You need to write a javascript code for this. This is not a simple solution and you need to hire someone to write the code for you

1 Like

Thank you for your reply. So to confirm, I can’t use a liquid script at all to add the functionality I need for the variant selector on the product page? Liquid conditionals won’t work here to render a text field when a specific variant is selected?