Yii Framework Forum: Scrolling Foreign Key Selection Screen? - Yii Framework Forum

Jump to content

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

Scrolling Foreign Key Selection Screen? Rate Topic: -----

#1 User is offline   stickdog 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 27
  • Joined: 29-April 10

Posted 30 April 2010 - 01:23 PM

I am a longtime programmer/developer, but a complete newbie with both yii and object oriented MVC web development frameworks in general, so please be kind.

I am developing a very complicated, database driven web application.

Many of the fields of my tables have foreign key relationships with the main "id" primary key of other tables.

What I want the CRUD screens for these tables to do is to force the user to choose from some sort of graphically displayed list of defined values (typically sorted by "name"). I don't want the user even seeing the auto-increment "id" primary key values of these foreign key fields, but rather (typically) the "name" field of these tables sorted alphabetically in a paging window. It would be nice to have some sort of functionality to jump to (or limit) the records that appear in this paging window to those that match how every many characters of the "name" field the user enters. I want this to be the only way these foreign key "id" field values can be selected by the user through entry/edit, and I don;t want the user to ever see any "id" field values on any screen or in any urls. Finally, I want the user to see the associated "name" field rather than the "id" key whenever these fields are displayed anywhere in the application.

I assume that many developers need this kind of functionality, but I am not sure what the best approach is to make this happen using yii.

Can somebody please take pity on me and help the helpless?
0

#2 User is offline   stickdog 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 27
  • Joined: 29-April 10

Posted 03 May 2010 - 06:13 PM

So yii has to have some way to display the available foreign key choices from the database and limit user entry to only these choices up front.

Right?

Could someone please help me out here? Please?
0

#3 User is offline   Onman 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 175
  • Joined: 26-December 09
  • Location:The Netherlands

Posted 04 May 2010 - 02:42 AM

Here are some topics for you to spend your spare time with:

CAutoComplete
CJuiAutoComplete
CActiveForm::dropDownList()
CHtml::dropDownList()
CHtml::activeDropDownList
0

#4 User is offline   stickdog 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 27
  • Joined: 29-April 10

Posted 05 May 2010 - 06:04 PM

Thanks a lot.

None of these are exactly what I am looking for out, but I am playing with them.
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