Description
The Before Display is executed right before a page is displayed in the browser. Use this event to modify the value of any template variable or to define a new one.
Syntax
BeforeShow($xt, $values, $pageObject)
Arguments
$xt
a template engine object. Use $xt->assign($name, $val) to assign a value $val to the variable $name. More info about template engine.
$pageObject
an object representing the current page. For more information, see RunnerPage class.
$values
an array of values to be displayed on the page. To access a specific field value, use $values["FieldName"].
Note: Field names are case-sensitive. If the field name is PlayerId, you should use $values["PlayerId"]. Note that $values["playerid"] or $values["PlayerID"] will not work.
Note: If the field was assigned an alias in the SQL query, then the $values array will get the alias instead of the field name from the database.
E.g., if you have an SQL query SELECT salesrep_id AS Inv_Salesrep ..., you should use $values["Inv_Salesrep"].
Applies to pages
View, Edit.
Recommended sample events:
•Hide controls on Add/Edit pages, based on logged user name
•Hide empty fields on View page
•Before display event for all pages except View/Edit
See also: