[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Setting multiple attributes
I am working on a minivend site for a client where the customer needs to be
able to enter in dimensions for products they're trying to order. Depending
upon the shape of the object, there can be as few as 1 and as many as 6
dimensions that must be filled in.
I have written the perl that generates an appropriate number of text input
boxes, but now feel like I might have pulled my socks on over my boots
because I can't seem to pass that information on to the Checkout/Receipt
pages.
Here's my code for generating the text input boxes:
[perl]
@dim_names = ("A","B","C","D","E","F","G","H");
$dims = [item-field dims_needed];
$name = 0;
while ($name < $dims) {
$var .= "Dimension $dim_names[$name]:<input type=text
name=[modifier-name dim$dim_names[$name]><br>";
++$name;
}
return $var;
[/perl]
Am I attempting the impossible, or do I just need stronger coffee?
--Bill