This topic is locked

Before display ..edit page

11/4/2009 1:52:16 PM
PHPRunner General questions
W
wpl author

Hi,
I need help in assigning values resulting from a db lookup to edit controls on an edit page. In the 'before display' event, I do a successful lookup for the needed values, but when I assign the values like so:
if($lookupdata)

{

$xt->assign("field1_editcontrol",$lookupdata["field1"]);

$xt->assign("field2_editcontrol",$lookupdata["field2"]);

}
the respective INPUT elements on the edit page are gone. There are only the values from field1 and 2 in the TDs. Any hints how to assign correctly these values?
thanks

J
Jane 11/5/2009

Hi,
this code won't work.

Please give me more detailed descritpion of what you want to achieve and I'll try to help you.

W
wpl author 11/5/2009



Hi,
this code won't work.

Please give me more detailed descritpion of what you want to achieve and I'll try to help you.


Jane,
thanks for answering. What I am trying to achieve is to assign (before display) values to INPUT controls on an edit page if these INPUTs are empty. But I just can't figure out the names of the variables I would have to do an: $xt->assign("name of INPUT??", $myValue).
Hope this helps clarifying my question

J
Jane 11/5/2009

Here is a sample code:

global $control_FieldName;

if (!$control_FieldName["params"]["value"])

$control_FieldName["params"]["value"] = $myValue;
W
wpl author 11/5/2009



Here is a sample code:

global $control_FieldName;

if (!$control_FieldName["params"]["value"])

$control_FieldName["params"]["value"] = $myValue;



Jane,
thanks al lot - works like a charm. BTW: is there a comprehensive list of all global variables that are available in different places?
regards