Jump to content

Adding Form Fields for Total


twilitegxa

Recommended Posts

What is the coding for adding form fields together and updating a blank text box with that value? Say I have three different pulldown boxes and I want to know, before submiting, how much these choices add up to when the user chooses their choices. Can a PHP script be written to accomplish this or must it be done with JavaScript? I prefer PHP, if possible. Anyone know how to do this?

Link to comment
Share on other sites

Can I put this code on the same page so that is validates this before going to the next page? I am actually going to be using sessions to connect to several other pages, but I am just trying to build the page first. So I have a JavaScript that checks for validation, I just need the PHP script to be able to do it on the same page before going to the next page, since this information will be carried over and not submitted until several pages later. What do you think? Can the validation be done on this page?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.