Hi,
I have been trying to find a way (using PHP Bible, google, etc) to auto-calculate some fields within a form. I don't know if this can be done with PHP or if I would have to use javascript. Although PHP is preferable, I'm desperate, so will use any scripting language to perfom the calculation! Does anyone have any ideas on how I can accomplish this?
I need it to calculate what the user inputs in the following way:
a user fills out the form with (e.g) the following values:
field1 value=10
+
field2 value=20
+
field3 value=5
hiddenfield subtotal (35)
x
1.175
field4 value=29.79
+
hiddenfield subtotal (35)
field5 value=64.79
I also need the script to round the value of field4 off to the nearest number, and need field4, and then field 5 to display the respective results once the user clicks on them.
Any help would be greatly appreciated 🙂
Jonathen