How to set form field values using JavaScript
Setting form field values from other values with javascript
*** BEFORE you do any of the following, it is ALWAYS a good idea to make a COPY of the file you are going to edit ***
1. The #1 thing you MUST know is that the NAME="yourVariableName" of each form field value you want to use in your script CANNOT contain any of the following or it simply WILL NOT WORK...
a hyphen (-)a number (1,2,3,4,5,6,7,8,9,0)an underscore (_)any punctuation (, . ! ? ; : ' etc.)
2. We reccommend you use a naming scheme similar to ours to keep things in order and to make logical sense of your variable names and function names...
- function names like: doThis(), doThat(), validateThisThing()
- form field names like: firstName, lastName, myHomeAddress, myCellPhone
- variable names (if you use them) like: varOne, price, grandTotal, salesTax
3. Here is our sample code
4. Once you have everything in place, it should function like this...
We really hope this has helped SOMEONE :-)
If it has please drop us a note at




