Webform Select Element Optgroup / hierarchy 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': |
    &lt;select  name="processed_textone" id="processed_textone" style="width: 570px;"&gt; 
    &lt;optgroup label="A"&gt;    
        &lt;option value="A1"&gt;A1&lt;/option&gt;
        &lt;option value="A2"&gt; A2&lt;/option&gt;
        &lt;option value="A3"&gt; A3&lt;/option&gt;
    &lt;/optgroup&gt;

    &lt;optgroup label="B"&gt;    
        &lt;option value="B1"&gt;B1&lt;/option&gt;
    &lt;/optgroup&gt;

    &lt;optgroup label="C"&gt;    
        &lt;option value="C1"&gt;C1&lt;/option&gt;
        &lt;option value="C2"&gt;C2&lt;/option&gt;
    &lt;/optgroup&gt;

  '#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.
@jrockowitz suggested I look here;
drupal.org/project/webform/issues/2783937

This solved my question. Thank you jrockowitz.