set value reqires refresh to see
Posted: Thu Feb 23, 2023 10:13 pm
When opening a popup I have code in the php before edit to lookup the users name and email and place it on the form.
It properly looks up the values, however to see them the user needs to press refresh. Is there a way to automatically show the value?
Also what would be the best way to set the value for the name field?
Code: Select all
$s = "SELECT * FROM zzzzsys_user WHERE zzzzsys_user_id = '#USER_ID#'";
$t = nuRunQuery($s);
if (db_num_rows($t) == 1) {
$r = db_fetch_object($t);
//$to = $r->InvtTo;
$from = $r->sus_name;
$email =$r->sus_email;
}
$j = " nuSetValue('EmailFrom','$email'); ";
nuAddJavascript($j);
Also what would be the best way to set the value for the name field?