With the Code Redemption field in the Form Designer, 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 (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.
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.
To get started, open the Form Designer for your form in the Campaign Builder. To do that; click on your form (either in the Preview area or in the Edit Widgets Panel), then click the Design Form icon - it looks like a miniature form.
With the Designer open, you'll see all the field types you can add to your form on the left. Click the Code Redemption field type to have it automatically added to the bottom of your form.
If you'd like to customize the location of the field, you can click and drag the field around to reposition it.
Once you have the field added to your form where you'd like it, you can use the Code Redemption Settings panel on the right side of the popup to make your adjustments to the field. This panel is broken up into a few different sections:
- Text: Here, you can add a Label for the field, a Placeholder that will appear in the field prior to your entrant typing anything in, and Instructions that will appear below the field to provide any needed clarity.
- Validation: This is where you'll be setting up the actual code redemption - we'll go over that in detail in the next section.
- Field Points: Using this section, you can make the field worth extra points when submitted - just add the number of points into the field.
- Display: Use this section to alter the appearance of the field itself. You can set the Field alignment to Left, Right, or Center. You can also adjust the Field size (for Desktop only) to Full, 50%, or 30%.
- Other: If you'd like to add an Extra CSS class to this specific field (to target with custom CSS code in your CSS Editor), you'd add the class to the field in this section.
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 the Required Field toggle is set to Yes. Once that's switched on, a field will appear where you can type in the error message that appears if the field is left incomplete.
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 popup 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 field provided, 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.
The Default error message field at the bottom of the section allows you to set up an error message for when entrants enter an incorrect code into the field.
With that step, your code validation is all set up! Click Save & Exit at the bottom of the Form Designer to close the popup.
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.