Posted by Michael P
2017-06-07

Hi Tom. I have made numerous modifications to your software and it runs perfectly.
My situation is this: I have a front end that grabs an input value from the user. The user is then directed to my modified version of your software.
I'm using cookies but cannot figure out how to insert the cookie value into the user's input form based on your software.
Help please. I can do cookies and all that but i don't know where to find I should put the 'input=cookie_value' statement. The variable you seem to use is rs:def:(input field) on tbl*...(page1).
Posted by Tom
2017-06-08

To initialize a form field, open web/form/app/cls_ps_(table-name).inc.php
Find the lines shown below:
$iv = $def->GetInitValues();
if ( $iv != null )
{
foreach( $iv as $key=>$val )
{
$obj =& $def->GetChild( $key );
$obj->SetVal( $val );
}
}

$def->ToState();
//-- [END] Set init values
Insert the following two lines above "$def->ToState();"
$obj =& $def->GetChild( "name" );
$obj->SetVal( "John" );
The result should look like
$iv = $def->GetInitValues();
if ( $iv != null )
{
foreach( $iv as $key=>$val )
{
$obj =& $def->GetChild( $key );
$obj->SetVal( $val );
}
}

$obj =& $def->GetChild( "name" );
$obj->SetVal( "John" );

$def->ToState();
//-- [END] Set init values
The code you inserted sets the "name" field to "John"
If you change "name" to "email", then you can set the value of the email field, etc.