Forms with Calculations

Is there a way to create a form that uses calculations (like an Excel document) that isn’t too mind boggling?

Our print design firm is fast and furiously being asked to do more and more web work. For our company, we need to set up an order form that will calculate number of units and price.

It will also have the usual contact info and then send all the information to an e-mail address.

Hopefully there is an “easy” solution that doesn’t require too much coding.

Thanks…


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

For our company, we need to set up an order form that will calculate number of units and price.

That depends a lot on how you define “easy”. It’s pretty simple to make a form calculate using its inputs. JavaScript has a complete Math class that can do pretty much any form of mathematics (or arithmetic, for that matter). And since you are only plugging the result into an e-mail, you don’t need to worry about somebody hacking your site and ordering a zillion widgets at 0.01¢ each.

Try this: lay out the entire form, add all the fields that go into the calculation, and get the form to submit and send a mail. Once you have that part working correctly (albeit sending you more fields than you want), you can move on to making the calculation work.

There are a lot of ways to send a form by mail, so I won’t go through that here. Most ISPs have a simple “form-mail” setup you can use, or there are a bunch of different scripts available that do this in almost any server-side language you might have available to you.

So when you have the form looking like you want, and submitting by mail, please post a link and a description of what gets added/multiplied/whatever and one of us can give you the next step up the ladder.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks, Walt.

We are in the middle of switching ISPs, so I don;t want to do anything “permanent” yet.

I was thinking of using the PHP Feedback Form form Freeway Actions to start with.

I THINK (for this particular form) I just need to add up the items picked to get a total number of items at the end and a total price at the end (with the possible addition of adding tax).

Since I don’t code, not sure if that’s a PHP thing or a Javascript thing. Or…where I would even put it on the page!


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

What I was suggesting was that you lay out the form the way your visitors would like to see it. Then we can see what the next step would be needed on the code side. I think that you could do this in javascript, then process the result with PHP. What I was hinting about earlier was that this approach is inherently insecure, but that doesn’t matter because you are processing these by mail, and can “sanity-check” them that way.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

OK. During the week I’ll see if I can layout the form or at least part of it (a lot will be repetitious) and I’ll show it to the board here.

Thanks again…


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Walt, I have a similar issue. I can lay out the form no problems, would you be interested in helping me with the Javascript side of things (for $ obviously)
Let me know…

Cheers.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options