Dynamic form elements

Dynamic form elements

I’m working on  a web page with a form and I need to apply conditional logic to the form so that when a selection is chosen from a dropdown an action or change is applied to the form.

 

I’ve found some examples through Google searches but it seems most of them make the action linked to a button rather than the selection of an item in a dropdown form item.

 

Can anyone help me with this? Either an example of the code or point me to an explanation / tutorial with examples.

Thank you to for your time and help.