Using a dropdown to prefill data
I've seen numerous ways to do this, but I don't really know Javascript enough to get it to work.
Basically I have a form I'm creating that I want to autofill most of the data based on a dropdown menu. I have the menu created. It is called "Designation" with three possible choices, A, B, C. I have a text box below that, that I want to autopopulate with data based on the choices in Designation.
If Designation = A, fill the text box with "123"
If Designation = B, fill the text box with "456"
If Designation = C, fill the text box with "789"
What would be the proper code for this, and will it fill based on clicking the dropdown and not a trigger with the text box?
Thanks.