less than a minute read • Updated 20 minutes ago
Add custom options to a product
How to add customer-configurable options to a product, such as size, color, or material.
Custom options let customers configure a product before adding it to the cart. Any input field added to your product form with a name not reserved by Foxy becomes a custom option — it will appear on the cart, receipt, and in the Foxy admin against that order.
How to set it up
Add named inputs to your product form. The input name becomes the option label, and the value becomes the option value:
<form action="https://YOURSUBDOMAIN.foxycart.com/cart" method="post">
<input type="hidden" name="name" value="T-Shirt" />
<input type="hidden" name="price" value="19.99" />
<select name="size">
<option value="Small">Small</option>
<option value="Medium">Medium</option>
<option value="Large">Large</option>
</select>
<select name="colour">
<option value="Red">Red</option>
<option value="Blue">Blue</option>
<option value="Green">Green</option>
</select>
<input type="submit" value="Add to cart" />
</form>
Options can use any standard HTML input type:
select— dropdown menusradio— radio buttonscheckbox— checkboxestext— free-text fieldshidden— fixed values not shown to the customer
Notes
Option names are case sensitive.
Option names are limited to 100 characters; option values are limited to 1024 characters.
Each product supports a maximum of 100 custom options.
Reserved parameter names (
name,price,code,quantity, etc.) cannot be used as custom option names — they will be interpreted as standard product parameters instead.Custom options are visible to customers in the cart and on receipts — use clear, human-readable names.
To adjust price, weight, or code based on the option selected, use modifiers — see Modify price, weight, or code with option modifiers.