Cognito-forms – Limit discount code to once per person

cognito-forms

I've created a referral discount code, I will personally hand out the discount code when someone refers someone else and that person orders. I Only want that person to be able to use that code once. (could be an unlimited # of people that could receive the code for referring someone) so I don't want to just limit the number of times the code can be used overall. Just limit an email to using the code once.

Best Answer

Contacted cognito support to make sure it works on the live site, and i was told it does!

create a calculation field with the below code

=if CouponCode.ToUpper = "THANKS123" then (Email + " " + CouponCode) else null 

set the calculation field to No duplicates in the settings

this limits a specific code to a one time use, while allowing all other codes to be used as many takes as you'd like.