[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Forcing Order of interpolation?
I was wondering if there was a way of forcing the order of
interpolation? Basically, I'm trying to create a fairly dynamic form,
where the user can enter the number of 'items', and the form will adjust
to that number of items. Here is my perl script on that page:
-----Begin Code-----
[perl interpolate=1]
my($string);
$string = "";
$string .= "<FORM ACTION=\"[process-target]\" METHOD=\"POST\">\n";
$string .= "<INPUT TYPE=HIDDEN NAME=mv_doit VALUE=refresh>\n";
$string .= "<INPUT TYPE=HIDDEN NAME=mv_todo VALUE=refresh>\n";
$string .= "<INPUT TYPE=HIDDEN NAME=mv_orderpage VALUE=\"thispage\">\n";
$string .= "Number: ";
$string .= "<INPUT TYPE=TEXT NAME=num_items VALUE=[value num_items]>\n";
my($item);
for $item (1..[value num_items]) {
$string .= "<INPUT TYPE=TEXT NAME=name_$item ";
$string .= "VALUE=\"[value name_$item]\" SIZE=20>\n";
}
$string .= "</FORM>\n";
return ($string);
[/perl]
-----End Code-----
My problem occurs in the loop. I need "$item" to be evaluated before
[value name_$item].
Any ideas? Or is this not possible, and I need to find another way?
(Such as running a separate CGI script)
Thanks for your time!
-Nick
--
"Laughter is the closest distance between two people."
-- Victor Borge