How can I add a discount code in my form?

How can I add a discount code in my form?

How can setup an option in my form so that people can fill-in a special discount code (voucher) and receive discount off the price item?