This topic is locked

dropdown box with links to related detail tables

10/31/2009 2:29:48 AM
PHPRunner General questions
woodey2002 author

Hi Guys,
If i have patient as my master table, and it has 4 detail tables linked via patient_id and id fields respectively.
Anyone know a good way to display the linked detail tables in a dropdown box, as right now my patient list page looks untidy with the related detail tables linked to the master table using the default phprunner master detail relationship link.
So could i see all patients on the list page and instead of having links to detail tables taking up a lot of room on the page, has anyway got a better way to display the master/detail relationship.
Kindest regards,
James
Phprunners No1 Irish Fan.

E
electromotive 11/2/2009

I have been thinking about this very requirement. Having lots of detail tables and needing a way to pick one. An option for dropdown list on the row sounds great.

Look forward to seeing some suggestions of how this might be done.

J
Jane 11/2/2009

Hi,
you can create this dropdown manually on the Visual Editor tab.

Here is a sample:

<select onchange="javascript: window.location=this.options[this.selectedIndex].value">

<option value="">Please select</option>

<option {$DetailTable1_dtablelink_attrs}>DetailTable1</option>

</select>



Then assign values manually in the List page: After record processed event on the Events tab:

$masterquery="mastertable=MasterTable&masterkey1=".$data["FieldName"];

$record["DetailTable1_dtablelink_attrs"]="value=\"DetailTable1_list.php?".$masterquery."\" ";