CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Multiple Forms One Page While Loop

Print topic Send  topic

Author Message
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.
View profile  Send private message
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.
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.