On dropdown filed type option values are not translated #1452
-
What happened?
How can we reproduce this?
Environment
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
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. |
Beta Was this translation helpful? Give feedback.
Hi @samuel-clara,
Just to clarify, you can only translate option labels, and that could be done with something like this:
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.