This topic is locked

Help with autofilling fields

10/18/2007 10:43:45 PM
PHPRunner General questions
L
laonian author

I have a table with three related fields. Field1 is the total of a bill (currency). Field2 is a portion of the bill for customer A (20% of the value of field1, or one fifth). Field3 is a portion of the bill for customer B (40% or two fifth). I have all three fields in the add page. My idea is that I will only populate field1 in the add page. Field2 and field3 will then be filled automatically accordingly. Could someone help me with any codes? Thank you.

J
Jane 10/19/2007

Hi,
you can do it using Before record added event on the Events tab.

Here is a sample code:

$values["Field2"]= $values["Field1"]0.2;

$values["Field3"] = $values["Field1"]0.4;