Issue Feature Closed

#92330Translation of defaultValue for hidden fields not working

Henrik Ziegenhain 09/17/20, 13:15 updated 03/31/26, 09:00

Description

Assumption:
- In your form you have some fields of type “hidden” and you give `em a defaultValue.
- multilanguage form

When dealing with translations, you may also want to localize your defaultValue of your hidden fields.
Common sense is to handle this with xliff files under the key “element.<my-field>.properties.label” for the label property of your field “my-field”</my-field>

Translating the defaultValue of <my-hidden-field> fails.<br>Whether “element.my-hidden-field.properties.value” nor “element.my-hidden-field.properties.defaultValue” is working.</my-hidden-field>

What is the correct syntax to address a hidden field value?

I am able to set an additional attribute like data-text with fluidAdditionalAttributes, and it works like I want it to. Like this I could set the hidden value via JavaScript. But this is a nasty workaround!

Reviews 1