This example code shows how to add a basic drop-down menu (list) to the Epayment form and how to assign it to specific fields depending on the placement of the drop-down. It assumes no other changes have been made to the payment form.
A drop-down can be added to any field in the form. It is important to always assign the drop-down menu to specific fields so that the transaction details will be transferred to the correct field.
The first step is to decide where you want to place the drop down menu in your form. In this example we will be using the amount field, also known as UMamount, within the form. You can look up all the fields under the complete payment form documentation.
Find the field and the row attached to it within the form. Here is an example of what the UMamount row with the field looks like:
<tr> <td bgcolor="#F0F0F0" width="234" align="right"><font size="2" face="Verdana">Order Amount:</font></td> <td bgcolor="#F0F0F0" width="450">[UMamount] </td> </tr>
Select the form code from
</tr> and replace it with the following HTML code:
<tr> <td bgcolor="#F0F0F0" width="234" align="right"><font size="2" face="Verdana"> Amount:</font></td> <td bgcolor="#F0F0F0" width="450"><select name="UMamount"> <option value="none">Select One</option> <option value="50.00">$50</option> <option value="100.00">$100</option> </select> </td> </tr>
The example shows what the code for a drop-down with two options would look. You can add as many options as you need. All you will have to do is repeat this cell
<option value="">……...</option>. You can change the wording of the first option value to whatever you want the drop-down to list; the example used here is “select one”.
The value of each option goes between the quotation marks like this:
<option value="this">this</option>, and the names of each option your customers will see goes between the angle brackets like this:
You can also add a drop-down menu that offers custom options to customers and then displays those options in a custom field in the transaction details. In the example shown above, this would mean changing UMamount to UMcustom1 and "Amount" to the name of your custom field.