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

Home » RADICORE » How To » Filter values of fields depending on other fields
Filter values of fields depending on other fields [message #1550] Thu, 14 August 2008 07:56 Go to next message
bonzo_bcn is currently offline  bonzo_bcn
Messages: 152
Registered: June 2008
Senior Member
I have and add1 transaction for 'team'.

A team has a 'sport' and 'category' fields.

Each sport has it's own categories, therefore I also have a table 'sport_category' with a 'sport' and a 'category' field.

What I want is that in the 'team' transaction, after the user has selected the 'sport', only the categories that belong to that sport should be shown and selectable.

I think this is only possible having the sport and category fields of the team table as popups, right?

Once the 'sport' has been selected, can the value be passed to the popup 'category'?
Re: Filter values of fields depending on other fields [message #1552 is a reply to message #1550] Thu, 14 August 2008 08:42 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2369
Registered: April 2006
Location: Surrey, UK
Senior Member
If you have two lists, and you want the second list to be populated using a value from the first, then why dont you follow the example in http://www.tonymarston.net/php-mysql/menuguide/dict_relation ship(add).html? Here you will see that the junior database is chosen from a dropdown, then the tables within that database are chosen from a popup. When the popup is activated it is passed the database_id which was selected in the dropdown. This is explained in the documentation at http://www.tonymarston.net/php-mysql/infrastructure-faq.html #faq17b (paragraph 3 and the _cm_popupCall() method)


Re: Filter values of fields depending on other fields [message #1555 is a reply to message #1550] Thu, 14 August 2008 13:55 Go to previous message
bonzo_bcn is currently offline  bonzo_bcn
Messages: 152
Registered: June 2008
Senior Member
Thanks, that worked flawlessly
Previous Topic: Field turns noedit without apparent cause
Next Topic: pickup subdir from table and put into upload_subdir
Goto Forum:
  


Current Time: Mon Nov 25 18:51:39 EST 2024

Total time taken to generate the page: 0.29542 seconds