This topic is locked

Hide/Show column of a child list when accessing via a Master Form entr

4/14/2010 1:17:04 PM
PHPRunner Tips and Tricks
F
FunkDaddy author

For those of you looking to hide/show columns of child records that are displayed on a Master form:
Step 1: Add to After Application Initialized event "$blockAlienEvents=false;"
Step 2: On the Master Form in which you plan on displaying child list(s) you simply add your standard column hide/show code to the "List Page" Before Display" event. For example:
$xt->assign("Address2_fieldcolumn",$_SESSION["Hide_Address2"] <> 1);

$xt->assign("Address2_fieldheadercolumn",$_SESSION["Hide_Address2"] <> 1);
That's all there is to it folks!
One more thing.. Jane helped me find this solution... she mentioned in one of her support emails that "detail events are not executed on Master View/Edit pages (to avoid naming conflicts). " I just wanted to add that here so everyone knows up front why it was done this way... it could also have some implication if your MAster form and child forms have similar column/field names (although I am only speculating that this is the case).