Unlimited Line Item Subform functionality in a FORM
Hi all, Here's the scenario: A user is entering an order, the order will have some info associated with it, and then the order can have multiple line items added to it. Each line item will have a number of attributes (like product, quantity, etc.). In a program like Access, you can create a form for the Order, and then create a subform for the line items. You can easily set it up so that the user can enter as many line items as they like. After they enter a line item, the interface adds a new blank line item. We need to replace an Access application with a ColdFusion application and provide this same functionality. If we have to, we could provide input fields for a specific number of line items, and then provide a button to add more items, but I was wondering if anyone knows of any custom tags, applets or ActiveX controls that would provide this functionality. Or perhaps I'm missing an obvious easy solution. Any suggestions would be greatly appreciated. Thanks, Bob ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Unlimited Line Item Subform functionality in a FORM
Bob, Sounds to me like your talking about an everyday shopping cart. I would use a associative array (structure) to store all the items names and values for each item and then append each of these structures to an array. At the end of the order, just loop through the array and output the structures (or line items) into the database. Make sure you have your line item table set up with a foreign key to the parent order table by using an order id. Then to pull an order just join the two tables by the order id. If none of this makes sense to you, just look at some tutorials on doing a shopping cart in Cold Fusion and they should give you the ideas you need. Rick -Original Message- From: Bob Silverberg [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 13, 2000 8:32 AM To: CF-Talk Subject: Unlimited Line Item Subform functionality in a FORM Hi all, Here's the scenario: A user is entering an order, the order will have some info associated with it, and then the order can have multiple line items added to it. Each line item will have a number of attributes (like product, quantity, etc.). In a program like Access, you can create a form for the Order, and then create a subform for the line items. You can easily set it up so that the user can enter as many line items as they like. After they enter a line item, the interface adds a new blank line item. We need to replace an Access application with a ColdFusion application and provide this same functionality. If we have to, we could provide input fields for a specific number of line items, and then provide a button to add more items, but I was wondering if anyone knows of any custom tags, applets or ActiveX controls that would provide this functionality. Or perhaps I'm missing an obvious easy solution. Any suggestions would be greatly appreciated. Thanks, Bob ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: Unlimited Line Item Subform functionality in a FORM
Rick, I think he is looking for an interface widget. - Original Message - From: "Rick Lamb" [EMAIL PROTECTED] Bob, Sounds to me like your talking about an everyday shopping cart. I would use a associative array (structure) to store all the items names and values for each item and then append each of these structures to an array. At the end of the order, just loop through the array and output the structures (or line items) into the database. Make sure you have your line item table set up with a foreign key to the parent order table by using an order id. Then to pull an order just join the two tables by the order id. If none of this makes sense to you, just look at some tutorials on doing a shopping cart in Cold Fusion and they should give you the ideas you need. Rick -Original Message- From: Bob Silverberg [mailto:[EMAIL PROTECTED]] Hi all, Here's the scenario: A user is entering an order, the order will have some info associated with it, and then the order can have multiple line items added to it. Each line item will have a number of attributes (like product, quantity, etc.). In a program like Access, you can create a form for the Order, and then create a subform for the line items. You can easily set it up so that the user can enter as many line items as they like. After they enter a line item, the interface adds a new blank line item. We need to replace an Access application with a ColdFusion application and provide this same functionality. If we have to, we could provide input fields for a specific number of line items, and then provide a button to add more items, but I was wondering if anyone knows of any custom tags, applets or ActiveX controls that would provide this functionality. Or perhaps I'm missing an obvious easy solution. Any suggestions would be greatly appreciated. Thanks, Bob ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Unlimited Line Item Subform functionality in a FORM
Hi, I'm sorry but I received your email accidently. Although I myself am I CF Developer and also doing something similiar to what your doing. I have to convert an MS Acccess 97 application to the web using CF. I am having a huge problem doing this though because for some reason CF will not allow me to convert the Access SQL query to work the same way. Mike Brzezicki ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Unlimited Line Item Subform functionality in a FORM
Here is a very quick DHTML example I just knocked up for u. (ie4 + ) Needs to be changed slightly to be DOM compliant You need to loop over the 'Form' collection on the "action" page to add each field (lineitem1,lineitem2 lineitem3 etc) Justin MacCarthy html head script !--// currentItem = 1; function AddLineItem () { currentItem++; e = "input tye='text' size='20' name='lineitem" + currentItem + "'"; lineitems.insertAdjacentHTML("BeforeEnd",e); } //-- /script /head body form action="" name="" div id=lineitems input type="text" name="lineitem1" size=20 /div input type="Button" onclick="AddLineItem()" /form /body /html -Original Message- From: Bob Silverberg [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 13, 2000 2:32 PM To: CF-Talk Subject: Unlimited Line Item Subform functionality in a FORM Hi all, Here's the scenario: A user is entering an order, the order will have some info associated with it, and then the order can have multiple line items added to it. Each line item will have a number of attributes (like product, quantity, etc.). In a program like Access, you can create a form for the Order, and then create a subform for the line items. You can easily set it up so that the user can enter as many line items as they like. After they enter a line item, the interface adds a new blank line item. We need to replace an Access application with a ColdFusion application and provide this same functionality. If we have to, we could provide input fields for a specific number of line items, and then provide a button to add more items, but I was wondering if anyone knows of any custom tags, applets or ActiveX controls that would provide this functionality. Or perhaps I'm missing an obvious easy solution. Any suggestions would be greatly appreciated. Thanks, Bob ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Unlimited Line Item Subform functionality in a FORM
Post some details to CF-talk. best, paul At 10:02 AM 12/13/00 -0500, you wrote: Hi, I'm sorry but I received your email accidently. Although I myself am I CF Developer and also doing something similiar to what your doing. I have to convert an MS Acccess 97 application to the web using CF. I am having a huge problem doing this though because for some reason CF will not allow me to convert the Access SQL query to work the same way. Mike Brzezicki ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Unlimited Line Item Subform functionality in a FORM
Thanks Justin - that looks like just what I was looking for. Now I've got to see if I can make it work with a complex form. Bob -Original Message- From: JustinMacCarthy [mailto:[EMAIL PROTECTED]] Sent: December 13, 2000 10:06 AM To: CF-Talk Subject: RE: Unlimited Line Item Subform functionality in a FORM Here is a very quick DHTML example I just knocked up for u. (ie4 + ) Needs to be changed slightly to be DOM compliant You need to loop over the 'Form' collection on the "action" page to add each field (lineitem1,lineitem2 lineitem3 etc) Justin MacCarthy html head script !--// currentItem = 1; function AddLineItem () { currentItem++; e = "input tye='text' size='20' name='lineitem" + currentItem + "'"; lineitems.insertAdjacentHTML("BeforeEnd",e); } //-- /script /head body form action="" name="" div id=lineitems input type="text" name="lineitem1" size=20 /div input type="Button" onclick="AddLineItem()" /form /body /html -Original Message- From: Bob Silverberg [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 13, 2000 2:32 PM To: CF-Talk Subject: Unlimited Line Item Subform functionality in a FORM Hi all, Here's the scenario: A user is entering an order, the order will have some info associated with it, and then the order can have multiple line items added to it. Each line item will have a number of attributes (like product, quantity, etc.). In a program like Access, you can create a form for the Order, and then create a subform for the line items. You can easily set it up so that the user can enter as many line items as they like. After they enter a line item, the interface adds a new blank line item. We need to replace an Access application with a ColdFusion application and provide this same functionality. If we have to, we could provide input fields for a specific number of line items, and then provide a button to add more items, but I was wondering if anyone knows of any custom tags, applets or ActiveX controls that would provide this functionality. Or perhaps I'm missing an obvious easy solution. Any suggestions would be greatly appreciated. Thanks, Bob ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists