PHPMaker generates the Master/Detail view page by including the Search Panel in the detail section. Most of the time, I do not need the Search Panel is displayed in the Detail section. The reason for this is that it often confused the users since if they use the Search Panel to find records that do not related to the Master record, then it always returns no records are found.
This following trick will show you how to hide the Search Panel in the Detail section of Master/Detail page easily and quickly. We will use the certain Server Event from PHPMaker to achieve it. In other words, we will not customize the template nor the generated code. This is very useful also for you, if you want to obviously hide the Search Panel dynamically only for the Master/Detail page, and leave it for the List pages (other than the Master/Detail page).
Want to see the demo? Just click here!
[hidepost]
Assume that we have a table name kecamatan, then put the following code under Server Events -> Table-Specific -> List Page -> Page_DataRendering:
if ($this->MasterRecordExists) { ?> <style>#fkecamatanlistsrch_SearchPanel, #fkecamatanlistsrch_SearchGroup { display: none; } </style> <?php }
As you can see, we just simply set the display style become none for the selectors that related to the Search Panel. Adjust it with your search panel and search group names.
[/hidepost]
Leave a Reply
You must be logged in to post a comment.