Calculate Per Other Fields

C

Casey

Hi,

I have a an html form that I am using as an order
form. I wanted to have for example one field show the sum
of the values of two other field entries. Right now all
of my fields are text fields, and I do not know if they
will be able to generate numerical values. Also, all of
the fields have the same name (T1) as you can see below.

Below shows on the top the field that I want to have
hold the sum, while underneath it are the three fields
that hold the digits that I want to add together to create
the sum. The other fields are very similar, and as I
mentioned, they are all named T1. If I have to change
that, please let me know.

<input type="text" name="T1" size="8" tabindex="12"
style="text-align:right">

<input type="text" name="T1" size="10" tabindex="9"
style="text-align:center">

<input type="text" name="T1" size="10" tabindex="10"
style="text-align:center">

<input type="text" name="T1" size="10" tabindex="10"
style="text-align:center">

If anyone could advise me on how to start to generate
calculations per this situation I would appreciate it.

Thanks
 
F

FrontPageForms

Hi Casey,

I am not exactly sure what you are trying to do, but you might want to take a look at the Java Order Form example on my site. It has a link back to the original. You can use the script as long as you leave the author and source info intact in the code.

As to your fields, they can't have the same name. On top of this you have two of them set to the same tab order. Not a good idea to copy fields. You will just end up with errors. If you had added each of the fields by Insert >> Form >> One line text box they would appear as T1, T2, T3, T4 etc.

As to calculating with the fields you created, there is no form of scripting directing this to happen.

If you need some form basics, stop by my site.

Mike Smith,

http://FrontPageForms.com
FrontPage Form Tutorials
& Form Script Examples

If you found my post helpful, please take a sec to click
the "Yes" button. I'm in it for the glory.
 
S

Stefan B Rusynko

Your form will not work if you have named all your fields the same - illegal html
- each field must have a unique name or the form will only process the 1st field (if at all)
For calculations in forms see
http://www.developer.irt.org/script/form.htm#6




| Hi,
|
| I have a an html form that I am using as an order
| form. I wanted to have for example one field show the sum
| of the values of two other field entries. Right now all
| of my fields are text fields, and I do not know if they
| will be able to generate numerical values. Also, all of
| the fields have the same name (T1) as you can see below.
|
| Below shows on the top the field that I want to have
| hold the sum, while underneath it are the three fields
| that hold the digits that I want to add together to create
| the sum. The other fields are very similar, and as I
| mentioned, they are all named T1. If I have to change
| that, please let me know.
|
| <input type="text" name="T1" size="8" tabindex="12"
| style="text-align:right">
|
| <input type="text" name="T1" size="10" tabindex="9"
| style="text-align:center">
|
| <input type="text" name="T1" size="10" tabindex="10"
| style="text-align:center">
|
| <input type="text" name="T1" size="10" tabindex="10"
| style="text-align:center">
|
| If anyone could advise me on how to start to generate
| calculations per this situation I would appreciate it.
|
| Thanks
 
M

MD Websunlimited

Hi Casey,

First, each field name should be unique and while it is not illegal HTML it will make the processing of the values much easier and
remain compatible with intrinsic FP functionality.

Take a look at J-Bots Form Field Calculator at http://www.websunlimited.com/order/Product/FormCalc/formcalc.htm

--
Mike -- FrontPage MVP '97-'02
http://www.websunlimited.com
Stop Spam Email Mining from your web pages with SpamStopper
http://www.websunlimited.com/order/product/SpamStopper/spam_stopper_help_dir.htm
FrontPage Add-ins Since '97 2003 / 2002 / 2000 Compatible
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top