Select element with custom options translations labels issue

Created on 30 May 2024, 6 months ago
Updated 23 July 2024, 4 months ago

Problem/Motivation

In a multilingual website, Webform select options translations have an issue. The latest select option's translated label is ALWAYS overriden by the first select option's translated label.

Steps to reproduce

1- In a multilingual website, add a "select" element in a Webform.
2- Use "Custom options..." to populate the keys/values options you want to be assigned.
3- Add a translation for the Webform and change value for the translated select option (the first one only). (/admin/structure/webform/manage/{webform_id}/translate). Save the form.
4- The latest option item value ALWAYS takes the value of the first select option translated (issue occurs on the translation form AND on the render page of the Webform in the translated language).

Important note to reproduce :

- Keys and values for an option in default language are identical (default behaviour on typing) and have spaces(example: Test key 1 / Test key 1)
- Issue occurs on any number of options

🐛 Bug report
Status

Fixed

Version

6.2

Component

Code

Created by

🇨🇭Switzerland grumpy74 Geneva, CH 🇨🇭

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024