Skip to main content

Decipher Support

All the topics, resources needed for Decipher.


FocusVision Knowledge Base

Set a Survey Password


Password entry into your survey can be done using the <text> question element, the File(..) function and a tab-delimited file. For information on using the File(..) function, click here.

Single Password Only

To create a single-password entry to your survey, you will need some way of identifying respondents in order to check their password. This is usually an extraVariable like source or id.

Given the following tab-delimited file named "passwords.dat":

source           password
un1qu30n3        p4ssw0Rd123
sp3C14LuN        iluvmypuppy99
bl4hblAHB        battery_horse_staple

We can use the File() function as described in Importing External Offline Data to compare unique identifiers with a password.

For example:

<html label="Introduction" where="survey">
  <p>Welcome to the survey!</p>
  <p>On the next page, you'll be asked for your password.</p>

<text label="PASS">
  <title>Please enter your password:</title>

<exec when="init">
dataFile = File("passwords.dat", "source")

<radio label="PASS_CHECK" where="execute">
respData = dataFile.get(source)

if respData and respData['password'] == PASS.val:
    PASS_CHECK.val = PASS_CHECK.yes.index
    PASS_CHECK.val =
  <row label="yes">Yes</row>
  <row label="no">No</row>

<term cond="">PASS_CHECK: FAIL</term>

<html label="Welcome" where="survey">Welcome! Please "Continue".</html>

Note: You can use a similar technique to validate a username and password against a tab-delimited file.