I Use Drupal 8.8 with Webform 8.x, in a simple webform with a select list element and a text field element, I need to update a text field element with values resulting from database queries when the user chooses an option from the listbox.
I would like to accomplish this with a PHP code in a custom mymodule. How can I intercept the user’s action when selecting a value from the select list?
Besides intercepting the event I also need to know the content of the choice that the user has made on the select list.
How can it be done? Can anyone give me an example?