I am using a webform element ‘select_other’ in the webform. We got a requirement that the "Other" field should only appear if certain conditions are satisfied.
I already have a Webform Handler In place, and using the alterForm(), I tried to change the #type
value, which removed the "Other" option, but duplicates the field wrapper property.
Is there any way to change the #type
of a webform element programmatically from webform_select_other
to select
?