This topic is locked

How do I - Before Add field sum()

12/11/2006 4:29:01 PM
PHPRunner General questions
J
jdandt author

on the ADD page I want to take a field value and multiply it times 0.445 to enter the final sum into the table. The field value I want to multiply is a field value dependant on a puldown prior to it. Help

J
Jane 12/12/2006

Jerry,
here is a sample code for the Before record added event:

function BeforeAdd(&$values)

{

$values["FieldName2"]= 0.445*$values["FieldName1"];

return true;

}



where FieldName1 and FieldName2 are your actual field names.

J
jdandt author 12/12/2006

Jerry,

here is a sample code for the Before record added event:
where FieldName1 and FieldName2 are your actual field names.


That worked great for adding to the DB but now how do I make fieldname2 a hidden field and not show up on the add page?

Alexey admin 12/12/2006

Jerry,
just remove it from the page on Choose pages tab or delete it manually on Visual Editortab.