Craft Commerce: Duplicate Input for Address State? In the Address section I have been defining UK counties to populate the State field when a Country is selected. I noticed that there is a standard text input when there is no defined states/regions/areas for a country and a drop down field for states when there is defined states. 

When a country like the US or the UK is selected both fields are shown however ideally it should only be the dropdown. See image of the problem:



Is there any logic that can be added to toggle it on/off ?

&lt;label for="{{ modelName }}-state"&gt;County / State / Region&lt;/label&gt;

{% set options = (model and states[model.countryId] is defined ? states[model.countryId] : []) %}
&lt;select id="{{ modelName }}-stateId" data-modelname="{{ modelName }}" class="address-stateId u-full-width {% if options|length == 0 or (model and model.stateName) %}hidden{% endif %}" name="{{ modelName }}[stateValue]"&gt;
  {% for key, option in options %}
    {% set optionValue = (model ? model.stateId : '') %}
    &lt;option value="{{ key }}" {% if key == optionValue %}selected{% endif %}&gt;{{ option }}&lt;/option&gt;
  {% endfor %}
&lt;/select&gt;

&lt;input type="text" data-modelname="{{ modelName }}" id="{{ modelName }}-stateName" class="address-stateName {% if options|length &gt; 0 or (model and model.stateId) %}hidden{% endif %} u-full-width" {% if model and model.stateName %}name="{{ modelName }}[stateValue]" value="{{ model.stateName}}"{% endif %}&gt;
This ended up being a css issue. In the CSS I had to create the following rule.

input[type="text"].hidden { display: none; }