How to create a dependent Product Field

A dependent product field appears is depending on if a value from a different product field has been chosen.

I'll be using the product fields from this article.

Create a new product field, and select whatever type you want in the Product Types tab.

I'm going to create product field called caps dependant. And I want it to only be available for all red hats.

The Colour field's name is called “Cap-Colour". A field's name acts as its identifier.

In “Depends On Name” I input “Cap-Colour”. A new text input appears called "Depends On Value". In Cap-Colours, we have a value called “Red”. I want this to only appear when “Red” is selected so I enter “Red”.

After pressing Save, the text input now only appears when red is chosen.

With a different colour, the text input doesn't show
With red selected, there is a text input