Best Way To Do A Form With Autosuggestion

Dear Friends , i m pretty new

i would explain what i would like to do

at the moment i have 4 crud form created by Gii , Everything works perfect but … i think there is a better way to do it

at the moment i have 4 tables in my db

Schools -------> Courses -------> Subjects ------------> Teachers

i would like to give the possibility to the final user to fill just the Teachers table and (maybe with autosuggestion ?) fill the other bonce …

do u have some suggestion helpful video or code that could help me . i have no idea how to start (and what search)

Is it possible to do it ? :)