This topic is locked

How to sum more than one field?

6/4/2008 6:21:00 AM
PHPRunner General questions
F
fid author

I have this in the add page

field1

field2

field3

total
i want to sum field1+field2+field3 and show the result in the total field in the add page.
Can someone help?

Thanks.

J
Jane 6/4/2008

Hi,
use Before record added event for this purpose.

Here is a sample:

$values["total"] = $values["field1"] + $values["field2"] + $values["field3"];

F
fid author 6/4/2008

Hi,

use Before record added event for this purpose.

Here is a sample:


Thanks Jane!