I have created a composite element where I added a custom textarea field in the element settings.
I have added that element in a webform, filled that textarea and saved the webform.
Now I want to translate the webform, But when I go the webform translations, I am unable to translate the value of that text area.
Is there any way to translate the value of that text area?
/**
* Provides a booking element.
*
* @WebformElement(
* id = "my_element",
* label = @Translation("My element"),
* category = @Translation("Composite elements"),
* multiline = TRUE,
* composite = TRUE,
* states_wrapper = TRUE,
* )
*/
class Myelement extends WebformCompositeBase {
public function form(array $form, FormStateInterface $form_state): array {
$form = parent::form($form, $form_state);
$form['element']['booking_email'] = [
'#type' => 'textarea',
'#title' => $this->t('some content'),
'#weight' => '0',
];
return $form;
}
}
Here is the backend of the element settings.
And here is the webform translation interface. I can't see my textarea field so that I can translate its content. I only see the composite element key and title.