Skip to main content
Easy Digital Downloads Documentation
Documentation, Reference Materials, and Tutorials for Easy Digital Downloads

Modifying the Required Checkout Fields

During checkout there are several required fields based on the options displayed during checkout. The standard fields that are required are email and first name, though if registering an account, then username and password are also required. By default, the last name field is not required, but it can be easily made that way. You can also set the first name to not be required.

This code snippet illustrates how to make the last name field required:

You can use the same technique to make any custom fields you have added required as well. The index key in $required_fields must match the field name sent to the server via the POST data.

You can also use this same technique to make default required fields not required, such as the first name field: