This feature available on All Plans
Contents
Making a Code List
Adding the Field to Your Form
Configuring the Field
Code Validation
Checking Redeemed Codes
Overview
With the Code Redemption Field Widget, you can now restrict access to who can submit your form by using a single code or multiple unique codes. In this doc, we'll walk through how to set up this field and configure it just the way you want.
Note: For the purpose of this doc, we'll already assume that you've started a new campaign and selected a template, then added a Form Container (if one wasn't already included in the template). If you need help starting a campaign, check out our Getting Started with ShortStack walkthrough video.
Making a Code List
If you plan on using a list of codes that you've created (instead of one single code), you'll want to create the list before jumping into the Campaign Builder.
You can create a list in any popular spreadsheet program. The Code Redemption field will mark your codes as redeemed as they are used for entries.
Here, we've created a code list in Google Sheets, and then saved the file in the .csv (comma-separated values) format.
Once you have your file saved, keep a note of where it's located; you'll need it for the Code Validation section below.
Adding the Field to Your Form
To get started, add a Field Widget to your Form Container in the Campaign Builder. To do that; click on the Field Widget icon in the Add Widgets Panel, then drag it to the position in your Form Container where you'd like it to appear.
With the widget settings open, you'll see all the field types you can add in the pop-up. Click the Code Redemption field type, then click Next.
Configuring the Field
You'll now use the Field Settings section of the widget settings to make your adjustments to the field. This section is broken up into a few different areas:
- Layout: Using this option, you can adjust the field's size to 30%, 50%, or Normal (100% width).
- Text: Here, you can add a Label for the field and a Placeholder that will appear in the field prior to your entrant typing anything in.
- Validation: This is where you'll be setting up the actual code redemption - we'll go over that in detail in the next section.
- Error Messages: Use the If field left blank and Code invalid fields to determine what error messages are shown when those scenarios happen, and the Maximum # characters field to set the limit on how many characters can be entered into the field.
- Field Points: Using this section, you can make the field worth extra points when submitted - just add the number of points to the Extra points awarded if field completed field.
- Other: If you'd like to add helpful text below the field to help clarify things for your entrants, you can add that verbiage to the Instructions field. To add a CSS class to the field (to make targeting the field with custom CSS easier) use the Extra CSS classes field.
Code Validation
The Validation section is where the meat of the Code Redemption feature is set up.
First, decide whether or not the field is required. If you're running a contest where only folks with the specified code can enter, you'll need to make sure to check the Required field checkbox. If you have a multi-part form where this field may be hidden, you can click Show advanced options to set up whether the form is always required, or only required if the field is visible.
Underneath this is where the Code Validation Method is selected; there are two options:
If Single Value is selected, a field will appear where you can type in the Code value. Keep in mind that this code value is not case sensitive; so if your code is set to "WINNER" and someone types in "winner" - it will be accepted.
If Code List is selected, a popup window will appear so that you can choose an existing code list from your account, or upload a new list.
If you want to use a list already on your account, simply click the name of the list, then click the blue Select button.
If you'd like to upload a new list, click on the New Code List link at the top.
A new pop-up will appear that provides a checklist for the formatting of your list, and a window for the upload. You can either drag and drop the .csv file you'd like to use into the window, or you can click Select and grab the file directly from your computer.
Once you've selected your file, you'll need to give the new list a name - enter it into the Name your list field, then click Save & Upload.
Now that the code list is connected to the Code Redemption field, you'll see the name of the list appear in the field settings. To change the connected list, simply click the edit icon (the pencil) to the right of the list name.
With that step, your code validation is all set up! Click Save & Exit at the bottom of the Form Designer to close the popup.
Checking Redeemed Codes
Whenever someone fills out and submits your form using one of the codes, that specific code will be marked as "Redeemed" in your code list.
The easiest way to check the code lists is to use the Code Lists Manager. To access this; in your account Dashboard, click Other at the top, then select Code Lists from the dropdown.
This will open the Code Lists Manager; at a glance, you can see the total number of codes, number of codes issued (emailed out to entrants), and number of codes redeemed for each list.
Find the list you'd like to view, and then click any of those numbers to the right of the list name.
You'll now see your code list. Any codes that have been redeemed will have the date they were submitted in the Redeemed column. To view the entry that submitted the code, simply click on the date. To delete a code, click the delete icon (the trashcan) to the right of the code you'd like to delete.