Creating Extra Fields

On checkout, buyers are prompted to provide some necessary information such as name, email, shipping address, etc.

Cart checkout

While Name and Email Address are always required by the cart, users may add any number of additional fields or remove fields they find unnecessary. This is accomplished from within the settings.php file, in the section labeled EXTRA FIELDS. By default, the cart includes these additional fields, which also serve as examples:

additionalfield=title=Address|required=no
additionalfield=title=Contact number|required=yes|errormessage=Contact number is required
additionalfield=title=Additional requests|required=no|inputname=additionalrequest

The 'title' is the field name that appears on the form. Set required to 'yes' or 'no' to control mandatory fields. The 'errormessage' is displayed when a mandatory field has been left empty.

An optional field, 'inputname', can be supplied to override the parameter name (which by default is based on the title). This is to resolve issues such as punctuation preventing the form from functioning correctly.

Print/export