Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » How To » Dropdown - value of foreign key (Dropdown is empty)
Dropdown - value of foreign key [message #2621] Tue, 21 September 2010 08:08 Go to next message
dsstanescu is currently offline  dsstanescu
Messages: 12
Registered: August 2010
Junior Member
Hello,

I have imported a database in which:
- table SISTEME has primary key cod_sistem
and
- table ANSAMBLE has primary key cod_ansamblu and a foreign key cod_sistem

I related the tables within the framework: parent is SISTEME and child is ANSAMBLE related through cod_sistem.

I then changed the column cod_sistem in ANSAMBLE to be DROPDOWN and I was expecting when adding a new record to ANSAMBLE to have the DROPDOWN cod_sistem of this table populated with the values from SISTEME. This does not happen ... I get a DROPDOWN which is not populated....

I always exported to PHP and I noticed that the ansamble.class.inc for ANSAMBLE is very basic (see the file uploaded) if compared with the one from CLASSROOM eg crs_student.class.inc. What I get inside the class is just a function ansamble, but not others as _cm_formatData, _cm_getExtraData etc. I read #298 and #490 threads, but did not succeed to solve it...

Thanks!
Dan

Re: Dropdown - value of foreign key [message #2622 is a reply to message #2621] Tue, 21 September 2010 11:00 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2367
Registered: April 2006
Location: Surrey, UK
Senior Member
Telling the framework that you want a field displayed as a dropdown (or radiogroup) is only half of the equation - you must also provide the framework with the entries to populate the dropdown or radiogroup. See How to incorporate dropdown lists or radio groups for details.

You might also want to take a look at:


Re: Dropdown - value of foreign key [message #2623 is a reply to message #2622] Tue, 21 September 2010 11:23 Go to previous message
dsstanescu is currently offline  dsstanescu
Messages: 12
Registered: August 2010
Junior Member
Thanks, I just did it. Of course, after reading as you said the other half ...

Dan
Previous Topic: upper case
Next Topic: add another action button to enquire form
Goto Forum:
  


Current Time: Thu Nov 21 20:38:53 EST 2024

Total time taken to generate the page: 0.00891 seconds