Well there are really two parts to this problem: how the form would work,
and what the interface would look like. One simple way to do it would simply
be to generate a lot of order lines (i.e. more than you need, say 100 or so)
and hide most of them using style="display:none", then just reveal the next
one as needed. I presume you need a field for product SKU or whatever along
with quantity. So I'd simply label the fields like this:

sku_1, sku_2, sku_3,. and qty_1, qty_2, qty_3,.. You can then in your
handler page loop through the full set of 100 or so fields, and access the
values..

<cfloop index="i" from="1" to="100">

            <cfset qty = val(form["qty_#i#"])>

            <cfset sku = form["sku_#i#"]>

            <cfif qty and len(sku)>

                        Add this order line to the database

            </cfif>

</cfloop>



  _____  

From: Kevin Rosenthal [mailto:[EMAIL PROTECTED]
Sent: Thursday, 22 July 2004 8:29 a.m.
To: CF-Talk
Subject: Need Help Bad!!

Hi everyone,

OK, here is my problem. I am a very new ColdFusion programmer and I have
been asked to write an Order Entry program for my fathers Clothing
Manufacturing Company. I have my tables all set using one for the main order
detail and another for the detail lines. I also have a customer table to
hold that info. Here is the hold up. I want to create an entry screen for
the order where the user can enter as many detail lines as they like without
having to redraw the screen after each line. I was thinking of putting the
detail lines into an array to be written to the DB once the order page is
complete.

Any help or suggestions??

Thanks,
Kevin

--
Outgoing mail is certified Virus Free.
Checked by AVG Anti-Virus (http://www.grisoft.com).
Version: 7.0.253 / Virus Database: 263.4.7 - Release Date: 7/19/2004

  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to