Dynamic Form to Mail

Posted on 2003-03-28
Medium Priority
Last Modified: 2013-12-24
I'm trying to build a dynamic form that allows users to choose spare parts (and quantities of) for a variety of products.

Depending on the product chosen, the form displays the name and a quantity box for each spare part that's available. The quantity box is dynamically named, so that I can pass the data using the #FORM.fieldnames# method.

Unfortunately, the actual spare part numbers & names all contain hyphens or spaces so I'm running into problems with passing the data.

I'm now working on an approach to assign a temporary identifier to pass the data and then convert it back to show the real values to the supplier when they receive their email. Needless to say I'm having difficulty with this.

This is not for a shopping cart. It's function is simply to send an email requesting a quote from the supplier.

Hope you can help. Thanks in advance.
Question by:NetSmith
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Expert Comment

ID: 8226266
Use an id or standard value for the quantity box and then pass the actual spare part name in a hidden field.

You shoudn't try to use regular names as ColdFusion variables.

<input type=text name=part#part_id#_quantity value=0>
<input type=hidden name=part#part_id#_name value="#part_name#">
LVL 17

Accepted Solution

anandkp earned 1000 total points
ID: 8229393
based on ur requirement given above.

it majorly depends how u structure ur HTML to eb able to form the form_fields

u cld use LOOPS basically [but i dont know if u ahve the otion to run them - if not u'll need to change it to form them & read them] this is how u do it

<cfloop index="i">
   <input name="qty#i#">
   <input name="Spares#i#">

& while reading them - u'll need to use another loop

<CFLOOP index="j">

this can be of gr8 help if u ahve ur form design lke i have suggested above [i genrally use this]

but if r working differently - then pls let me know ur format - so i can decide & help u on that accordingly :)


Author Comment

ID: 8238344
Thanks for the help. I went down a different road in the end, using Structures, but the advice was good - thanks again.

LVL 17

Expert Comment

ID: 8243141
yeah structures is also a neat way to go ...

but ive always prefered using list & love playing with them ... so ... :)

thanx for the points thou


Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses
Course of the Month15 days, 17 hours left to enroll

741 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question