Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
Old 08-24-2005, 02:20 PM Forms Processor
Junior Talker

Posts: 4
Trades: 0
I've created an order form for a client who does large-format digital printing.

This is the form...

The form uses values from the width & height fields to calculate the total square inches of the printed piece. Then, the cost of each option (Resolution, Stock, Mounting, Laminate, & Frame) is added up and multiplied by the total square inches. Finally, this number is multiplied by the quantity to get the total order quote.

The math part all works perfectly. The problem I am having is that on the preview page it displays the form field value for each option. The math uses this value to calculate the price, but I want to show the option name -- not the value -- to the customer. For example, if you complete this form and select the "Adhesive Vinyl" option for the "Stock" field, it will display "Stock 5" on the preview. I need for it to display "Stock Adhesive Vinyl" instead.

This basically means that it should display the option "name" rather than the option "value".

If it helps, I am using Form Processor Pro to build this form. I thought maybe I could use an IF condition to do this, but I cannot get it to work.

Any advice would be greeeatly appreicated.
__________________
Howard Theriot

Please login or register to view this content. Registration is FREE

Last edited by hobartimus; 08-24-2005 at 02:31 PM..
hobartimus is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-27-2005, 01:19 AM
Experienced Talker

Posts: 47
Trades: 0
Well, the problem is that you are sending 5 as the value (in the example you used). The form is only going to submit 5 for that variable and not the value inside of it. You can go about this in multiple ways, either take the value off of the select so the value is the name instead. Make a list of them and then check them to change the name (ie. if (stock == 5) { stock_print = "Adhesive Vinyl" }). The other way I can think of is to have it all in a database, and then when they select check for it by id. So if Adhesive Vinyl's id is 5 you'd use a query like "SELECT name FROM stock WHERE id = '5'"

I believe you're using Javascript to process everything and I'm not too familiar with doing forms with Javascript so hopefully you can figure it out with this information.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Synchronize is offline
Reply With Quote
View Public Profile
 
Old 08-27-2005, 10:14 AM
Junior Talker

Posts: 4
Trades: 0
Thanks for your advice, but I think we figured it out.
__________________
Howard Theriot

Please login or register to view this content. Registration is FREE
hobartimus is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Forms Processor
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.26681 seconds with 12 queries