The following code shows how to add fields to the customer order forms for StoreFront 2000. The forms that may be modified are credit.htm, po.htm, echeck.htm, cod.htm, and phonefax.htm. Before beginning your modifications, please note that problems caused by customization cannot be supported by StoreFront support.
ex of input field added to credit.htm
<.td align="left"><.input type="text" size="28" name="NEW_ASP_FIELD"><./td>
The information that is input into the new field is being stored in a variable named NEW_ASP_FIELD
Once the new field has been added to the HTML order form, you need to have confirm.asp, around line 61, capture this information with this line of code.
NEW_ASP_FIELD = Replace(Request("NEW_ASP_FIELD"),"'","''")
(the replace statement gets rid of single quotes and replaces them with double quotes, sometimes necessary)
Finally, you will need to have the update query changed in confirm.asp. Do a find for UPDATE CUSTOMER in confirm.asp.
Add this line to the SQL statement
& "NEW_DATABASE_FIELD = '" & NEW_ASP_FIELD & "', " _
Now your asp pages are ready to take the information.
Next, the information needs to be stored somewhere in the database (you will receive errors until you add the fields in the database, so don't test them yet.)
Open your database in Access and highlight the customer table. Click on the Design button to look at the design view of this table. Here, you need to add a field with the same name you gave it in the SQL statement; in this example, the field would be called NEW_DATABASE_FIELD. This field will need to be text and should be set to allow zero length strings. Also be sure that the field is big enough to accommodate the information you are collecting with the new order form field.
You will also need to create your own reporting feature to use this information. Our reporting features will not look for the extra information.