I've figured out how to create forms with discount codes in Cognito Forms. I'd like to be able to prevent specific discount codes from being entered more than once. For example, suppose I will deem a discount code 'valid' if it contains the text 'ABC.' I can check for that, easily. So codes ABC123, ABC456, ABC789, etc. would all be valid. But what if I want to ensure that ABC123 only gets entered once total among all form entries, ABC456 only gets entered once among all form entries, etc. Is this possible? I do not want to limit respondents to how many forms they are allowed to submit.
- Select your Discount Code field in the builder
- Set Limit Quantity to No Duplicates
- Set Error Message to This discount code has already been used!
This will prevent discount codes from being used more than once!
You can learn more about quantity limits in our help documentation!