I am in the process of adding a locale selector to my shopify theme. Basically, i need to have the form auto submit on selection, rather than the user make the selection from the dropdown, then press submit. How would I edit this code to make that happen?
I would remvove the submit button alltogether!
{% form 'localization' %}
<select name="country_code">
{% for country in localization.available_countries %}
<option value="{{ country.iso_code }}"
{%- if country == localization.country %} selected="selected"{% endif %}
>
{{ country.name }} ({{ country.iso_code }}) - {{ country.currency.symbol }}
</option>
{% endfor %}
</select>
<input type="submit" value="Update">
{% endform %}
Shopify documentation on this is here: https://shopify.dev/themes/internationalization/multiple-currencies-languages?shpxid=400ba4ec-D0ED-488B-F8D1-3B448EF5D236
Thanks all!