jmwhooper
Posts: 7
|
Posted: 11/27/2011, 2:52 PM |
|
I have 6 forms on one page, each form is the same in terms of functionality, they calculate some values based on lookups from the DB.
I'd like to build the calculating functionality across each form using a while loop and setting control values in the loop. So for example, loop 1 sets $form1->field->SetValue(), the next loop through does $form2->field->SetValue() etc.
My question is how can I use a variable value for each loop though as the $formX value? Something like this:
$i=1;
while($i<4)
{
//set field value to 20
$form1->fieldName->SetValue(20);
$i++;
}
obviously replacing $form1 with the $form $i value to give the form a number each loop through.
|
|
|
ckroon
Posts: 869
|
Posted: 11/28/2011, 8:25 AM |
|
If you put that code on each forms After Insert Event you should be good to go
_________________
Walter Kempees...you are dearly missed. |
|
|
|