Web form: how to calculate sum from user input?

Joan Graham grahamjo at oplin.lib.oh.us
Thu Sep 23 10:43:42 EDT 1999


I've lurked but not seen this; hope someone knows how and can inform me.

I need to make a form that will:
1) accept user input of dollar amounts into several fields
2) have a "calculate" field which totals the user input from the
previous fields
3) work with all recent browsers
4) work successfully with the FormMail script from Matt's Script
Archives

I've made a form that included the input fields, and added to the page
another calculator form that I got off the Web, where the user could do
their calculations and then fill in the Total field of the first form.
This is a compromise, not what I'd really like to do.

I've seen scripts that operate on numbers, but the numbers are part of
the script.
In this case, the form would have to work like a spreadsheet formula.
I'm hopeless at math, so anyone with answers(no pun intended) could you
please respond? Thank you.

Joan Graham
Stark County District Library



More information about the Web4lib mailing list