People sometimes ask me if you can add a field to a thank-you screen. Can you ask users a question once the data is saved? For example, our survey is anonymous, but we would still like to know who completed it, because there is a prize draw?
The first and easiest answer is: no, you can’t add a field to a thank-you screen.
The second and most welcome answer is: yes, you can collect data after an entry has been submitted.
How to do that? Let’s use an example of an anonymous survey which offers a prize for a single randomly selected user.
You need two forms: one with the survey, and one for collecting personal data. The survey is anonymous, so the first form doesn’t contain fields for collecting personal data. Those fields are in the second form, which is linked to the survey somehow.
There are several ways to link the forms.
First, you can place a link to the other form on the thank-you screen of the first form (the survey), for example: “To take part in the prize draw, leave your data”.
Second, users can be redirected automatically to the other form, bypassing the thank-you screen. Obviously, you should clearly explain that data entered so far (survey responses) will remain anonymous, and data entered now (personal data) are used only in the prize draw.
Third, the other form can be embedded within the thank-you form using the IFrame mechanism. Again, you might want to work on messages like in the second option.
No matter which method you use, ensure that people who have not completed the survey cannot enter their data to take part in the prize draw. The easiest way to do so is to send a unique string from the survey (called a token) to the other form. In order for the prize draw entry to be valid, it has to contain a token that confirms the person has completed the survey.
Create a hidden field in the form that collects data for the prize draw, e.g. ‘survey_answer_token’. Using the field prefilling mechanism via URLs, call the other form by passing the token from the survey:
The $afEntryToken$ tag will be replaced with a unique string of characters assigned to a specific reply to the survey the moment it is called. When you single out the winner of the contest, check if his or her value in the survey_answer_token field corresponds with a response to the survey (to make sure URLs haven’t been manipulated).
Survey data and personal data needed for the prize draw are accessible in ActiveForms in two different files. With diligence and integrity you achieve a number of goals this way: