Forms with Multiple Product Options
This page shows how to create forms with multiple product options using multiple drop-down menus, radio buttons etc. Please ensure you have read:
- the basic links page which explains how to create basic links, and
- the linking with forms page which explains how to create form links to FastCart.
Introduction to Forms with Multiple Product Options
Some products have multiple product options, such as size, shape and colour. For example, a t-shirt will have properties of size, shape, colour, style and so on. The basic links and basic forms may not always be suitable for this type of product - you may prefer multiple drop-down menus instead.
You should note that there are some differences between the basic forms and the multiple option forms:
1) | You need to use custom[] instead of item - note that the word custom is followed by square brackets with no spaces |
2) | You may use only one price per form, regardless of the options chosen for that product. If pricing changes according to options (ie, small and large are different prices) then you must use separate forms (ie, one form for large and another for small) |
Multiple Product Options Example Code
The following are just some of the ways you can create links with multiple product options:
Multiple Drop Down Menus | HTML Code |
| <form action="http://www.fastcart.co.uk/cart/index.php" method="post" target="_top">
<input type="hidden" name="id" value="1223">
<select name="custom[]">
<option value="Blue Widget">Blue Widget
<option value="Green Widget">Green Widget
<option value="Red Widget">Red Widget
</select><br>
<select name="custom[]">
<option value="Large">Large
<option value="Medium">Medium
<option value="Small">Small
</select><br>
<select name="custom[]">
<option value="Circular">Circular
<option value="Triangular">Triangular
<option value="Square">Square
</select><br>
<input type="hidden" name="price" value="9.99">
<input type="submit" value="Add to Cart">
</form>
|
You can use as many drop down menus as you like. |
Combination | HTML Code |
Select:
| <form action="http://www.fastcart.co.uk/cart/index.php" method="post" target="_top">
<input type="hidden" name="id" value="1223">
<input type="radio" name="custom[]" value="Blue Widget">Blue
<input type="radio" checked name="custom[]" value="Green Widget">Green
<input type="radio" name="custom[]" value="Red Widget">Red
</select><br>
<select name="custom[]">
<option value="Large">Large
<option value="Medium">Medium
<option value="Small">Small
</select><br>
<select name="custom[]">
<option value="Circular">Circular
<option value="Triangular">Triangular
<option value="Square">Square
</select><br>
Quantity: <select name="qty">
<option value="1">1
<option value="2">2
<option value="3">3
</select> <input type="hidden" name="price" value="9.99">
<input type="submit" value="Add to Cart">
</form>
|
You can combine radio buttons and multiple drop down menus and quantity if you want to. |