Skip to content

On dropdown filed type option values are not translated #1452

Discussion options

You must be logged in to vote

Hi @samuel-clara,

Just to clarify, you can only translate option labels, and that could be done with something like this:

<label>My Dropdown Field</label>
<select name="{{ myDropdown.handle }}">
{% for option in myDropdown.options %}
    <option value="{{ option.value }}" {{ option.value in field.value ? "selected" }}>{{ option.label|t('freeform') }}</option>
{% endfor %}
</select>

However, the actual value selected will always be stored in the database as the value entered in the form builder for it. The Submissions area of the control panel and any email notifications will not take this into consideration.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@samuel-clara
Comment options

@kjmartens
Comment options

Answer selected by kjmartens
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1447 on August 05, 2024 15:06.