I am sure I've seen a post on this but I cannot seem to find it now.
How do I populate fields on a form based on the selection of a dropdown list? I have a list populated with the names of students. When a student is selected, I need to populate fields with the info related to that student. Is there a hook or function call I can use after a dropdown selection has been made?
Also, what will be the correct hook to use to execute code as the submit button is pressed? I would like to populate a hidden field with a unique ID based on the input and selections on the current form. So the code would have to execute before the values are written to the database.