Link to home
Start Free TrialLog in
Avatar of NetSmith
NetSmith

asked on

Dynamic Form to Mail

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.
Avatar of weeezl
weeezl

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#">
ASKER CERTIFIED SOLUTION
Avatar of anandkp
anandkp
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of NetSmith

ASKER

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

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

Cheers,
Anand