Discount Codes - In Depth

We have a Help Page on adding a discount code to your form already, but some users are still confused on how to do this, so I thought I'd do a more in-depth post on the topic.

For the Formstack discount code plugin to work, you need at least two fields on your form:  a Total field that automatically calculates a total and a Short Answer field to serve as your discount/coupon code field.  People usually get stuck when they don't know how to create calculating form fields for their Total fields.

Without getting too complicated, any Short Answer, Number, Select List/Dropdown List, Radio Button, or Checkbox field that contains a number(s) can be added, subtracted, multiplied or divided by any other Short Answer, Number, Select List/Dropdown List, Radio Button, or Checkbox field to create a total.

 So let's say we are charging $5 for books.  We could create a total field in a couple of different ways.  First, we could add a number field (Price Per Book) to our form with a default value of $5 and then multiply that by our Quantity field to get a Total. See below for a view of the default calculation for the Total field and the price and quantity fields involved on the form in Build mode:


Or, instead of multiplying Price * Quantity, we could use the "Use Separate Values" option in the Quantity field to add the corresponding dollar values to our Quantity field options, like so:


Then the Total field would need to look like this with just the Quantity field in the calculation:

 Once we have a Total field on our form, the next step is to add a Short Answer field to use as our discount code field. You can drag and drop a Short Answer field over to your form in the spot you'd like it to appear and then label is "Discount Code".

The fields on our form should now look something like this:


Now, go to the Settings > Plugins tab and click the "Add" button next to Discount Codes, then 'Settings'.



You will be directed to the Discount Code plugin set up page. Map the appropriate fields on your form to the fields in the settings and add your discount codes.


 There are two types of codes we can add, a percentage off or a flat dollar amount off.  To add a percentage off code, choose the % symbol and to add a flat dollar amount off, choose the -- symbol. In the example below, the Save5 is 5% off and the Save10 is $10 off.

 Optionally, you may also enter an Expiration Date and number of times the Code may be used.  The "Expires On" option will allow you to set a Date at which time the individual Discount Code will expire and will on longer be active for discount deductions.  The "Uses Left" setting will allow you to limit the number of times this Code can be used by your Submitters before the code becomes inactive. If you leave these blank the codes will be able to be used unlimited times until you remove them from the list.

To add multiple discount codes, hit the green plus button next to the code field. To delete codes, hit the red minus button.


Now when you view your actual form and type in one of your discount codes, then click "Apply Code", your Total field will change to reflect the discount and the new Total will be displayed:


Note: Make sure you don't add extra unnecessary spaces when setting your codes. The codes entered must be EXACTLY as they are set in your settings in order for them to work properly.


Was this article helpful?
1 out of 6 found this helpful