Yii Framework Forum: Selected Dropdownlist - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Selected Dropdownlist Rate Topic: -----

#1 User is offline   experia007 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 17-April 11

Posted 08 May 2011 - 10:05 AM

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..:)
0

#2 User is offline   PeRoChAk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 570
  • Joined: 26-November 10
  • Location:Lahore, Pakistan

Posted 08 May 2011 - 11:32 AM

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

Tip:
Use can use AJAX for this or use inline form elements
Cheers
Perochak
Web Design - Logo Design - Application Development

My Blog | Forums Comparison
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users