Selected Dropdownlist

Hi…I’m new in YII, this is my first time to create application with YII Framework.

I have table user (id_user, username, password, role), and table doktor (id_doktor, name_doktor, title, id_user), operator(id_operator, name_operator, salary, id_user). Doktor and operator is role, and in dropdown list type.

Ok, I create a user, and i want when i choose the role is doktor(as selected dropdownlist) in form user, automatically appear the form for the doktor(id_doktor, name_doktor, title, etc) below user form. As well as when i choose the role is operator automatically appear the form for the operator. So i can fill the form user and update the doctor/operator table at once.

How I can do that? Ajax or something? help me…

~Sorry for my English…:)

You need to use behavior for this operation and saveBehavior ext for saving the results/inputs

Here is the logic

When a user select the value from dropdown, form will be displayed

use randerPartial to display the form


Use can use AJAX for this or use inline form elements