[ic] Select loop question

Brian Kosick interchange-users@lists.akopia.com
Tue Jul 17 17:13:00 2001


Answered my own question again...


This code works
<SELECT NAME="mv_order_quantity">
[loop list="1 2 3 4 5 6 7 8 9 10" option="mv_order_quantity"]
<OPTION value="[loop-code]">
[seti itemqty]
         [calc]
            [loop-code]*[item-field qty]
         [/calc]
[/seti]
[scratch itemqty]
[/loop]
</SELECT>

At 04:54 PM 7/17/01 -0400, you wrote:
>Hello again,
>
>         The DB that I'm working on is a plant store.  They have plants 
> that are sold either individually or in groups.  As in depending on the 
> plant, when they order 1 item, it could come with 1,2,3 or more plants in 
> the package, depending on how they decide to charge for them.  I'm trying 
> to create a select pull down that has the option value pairs based on 
> these groupings.  I found the select loop code:
>
><SELECT NAME="mv_order_quantity">
>[loop list="1 2 3 4 5 6 7 8 9 10" option="mv_order_quantity"]
><OPTION> [loop-code]
>[/loop]
></SELECT>
>
>This works great except that I would like to multiply the TEXT (not value) 
>of the option to match the quantity of the groups.
>
>If the plant is sold in a group of three, the select box would read 
>3,6,9,12,15, etc and the option values still are 1,2,3,4,5, etc
>
>perhaps something like:
>
><SELECT NAME="mv_order_quantity">
>[loop list="1 2 3 4 5 6 7 8 9 10" option="mv_order_quantity"]
><OPTION> [loop-code] * [item-field qty]
>[/loop]
></SELECT>
>
>Is the above possible?  Or am I going to have to break out perl?
>
>Brian Kosick
>Web Programmer
>New Age Consulting Service, Inc.
>216-619-2000
>briank@nacs.net
>
>_______________________________________________
>Interchange-users mailing list
>Interchange-users@lists.akopia.com
>http://lists.akopia.com/mailman/listinfo/interchange-users

Brian Kosick
Web Programmer
New Age Consulting Service, Inc.
216-619-2000
briank@nacs.net