Hello fellow Drupal users, I have created an advanced HTML element in my webform. When the form is submitted the advanced html element reverts back to the default setting, which in this case is option A1. The users selection and data for this element is not in the submission.
This is the YAML an example form:
processed_text:
'#type': processed_text
'#display_on': both
'#text': |
<select name="processed_textone" id="processed_textone" style="width: 570px;">
<optgroup label="A">
<option value="A1">A1</option>
<option value="A2"> A2</option>
<option value="A3"> A3</option>
</optgroup>
<optgroup label="B">
<option value="B1">B1</option>
</optgroup>
<optgroup label="C">
<option value="C1">C1</option>
<option value="C2">C2</option>
</optgroup>
'#format': full_html
I would like to get the data of the selection upon submission. I tried using a computed twig and Ajax, but that doesn't seem to work either. I think I might be able to add a javascript file to get this data into the submission, but I'm not sure. I'm pretty new at subtheming and js in general.
list(text)
field to the webform via the UI?