⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

set-relation based on dropdown



semoetz
  • profile picture
  • Member

Posted 20 May 2015 - 02:47 AM

Hi,

i'm new to this GC, and i have already follow the basic-tutorial from this site. But i have problem on how to display data from a table based on dropdown (static dropdown, not from the tables).

 

Here's the case :

 

[attachment=940:GC-case.png]

 

The first Dropdown contains static list :

$crud->field_type('device','dropdown',array('SERVER' => 'SERVER', 'NETWORK' => 'NETWORK'));

The second Dropdown contains field from another tables, with two condition:

*) If "SERVER" selected from the first Dropdown, then this Dropdown contains "server-name" field taken from "table-server"

*) if "NETWORK" selected from the first Dropdown, then this Dropdown contains "device-name" field taken from "table-network-device"

 

can i use set-relation to this case?

 

Thx.