I have 3 tables:
Department
id
name
Employee
id
name
department_id (belongs to Department)
Form_Table
id
employee_id (belongs to Employee)
In the “Add New” form for Form_Table, I select an Employee (employee_id).
But I want to immediately display that employee’s department name (and other related fields like division, subdivision) inside the same form.
However, the Employee select field only shows employee data — it does not automatically show nested relation data like department name.
How can I show related data (department name, division, subdivision) from a second-level relation inside the form dynamically based on the selected employee?