Please enable JavaScript to view this site.

Navigation: Advanced topics > Events > Sample events > Misc

PHPrunner32x32     PHPRunner manual


Speed up data entry using events

Scroll Prev Next More

 

When on the Add page, you might want to populate some edit boxes with previously used values. This can be done by using a combination of Default values and an AfterAdd Event.

 

Lat's say you need to enter several data records for each Employee. To populate the Date and Employee fields with the most recent values, you need to complete the following steps:

 

1. Set Default values of those fields to $_SESSION["Date"] and $_SESSION["Employee"] respectively. This can be done in the "Edit as" settings dialog.

 

2. Create an AfterAdd event and use the following code to save the Date and Employee values in Session variables:

 

$_SESSION["Date"] = $values["Date"];
$_SESSION["Employee"] = $values["Employee"];

See also:

"Edit as" settings. Default values

Session keys

PHPRunner session variables

Session table variables in the WHERE clauses

 

Created with Help+Manual 7 and styled with Premium Pack Version 3 © by EC Software