In order to prepopulate the field 'a' from the earlier visit of the same person, the following event (add page, before display) worked in v.4.2 and does not in v.5.0.
What would be the reason?
[codebox]global $conn, $strTableName;
$str = "select visit.a
from visit where SubjectId=".$_SESSION[$strTableName."_masterkey1"];
$rs = db_query($str,$conn);
$data = db_fetch_array($rs);
$smarty->assign("value_a",$data["a"]);[/codebox]