Hallo.
I found and used this code to pick a default value from a master table:
In detail table, select value from master table in the edit page: Before process event and save it in the session variable:
global $conn, $strTableName;
if ($_SESSION[$strTableName."_masterkey1"])
{
$str = "select Field1 from MasterTable where FKey=".$_SESSION[$strTableName."_masterkey1"];
$rs = db_query($str,$conn);
$data = db_fetch_array($rs);
$_SESSION["Field1"] = $data["Field1"];
}
Then use $_SESSION["field1"] as default value on the "Edit as" settings dialog on the Visual Editor tab.
It works fine when editing, but when I try inline edit, the value won't change from the defualt. How do I fix this?
Mandy