SurveyFactory Documentation Documentation Configuration template variables
Configuration template variables

Template variables > Configuration

Configuration template variables are passed through to your template every time it is rendered. These fields help to explain what the template should show and provide information such as link paths, the current time and more.

survey.config.
   datetimeutc
   templateurl
   templatepath
   formurl
   formfields.
   formname
   display.
      access
      type
      where


survey.config.display.

The config.display template hash contains three variables that are used to inform controller.tpl and the rest of your template files what should be displayed (type), where the content is being viewed (where) and to whom it is being shown (access). control what is being displayed where and to whom. Currently, the following combinations are possible:

accesstypewhere
adminpreview-questionweb
publish-methodweb
responseweb
print
respondentemailemail
surveyweb
publicationweb

survey.config.display.access

This variable has two potential settings depending on who is viewing the page:

  • admin
    .access is set to 'admin' when the survey creator is viewing the response or a preview of a question.

  • respondent
    .access is set to 'respondent' when the person who is taking the survey is viewing a survey or publication page, an email is being sent to them, etc.

survey.config.display.type

This variable has several different settings depending on what should currently be displayed:

  • survey
    .type is set to 'survey' when a respondent is taking the survey in their web browser
    .access = 'respondent' and .where = 'web'

  • publication
    .type is set to 'publication' when a respondent is taking the survey in their web browser and publication restrictions, prompts or errors is forcing a display. Examples include a publication error (response timed out, closed, etc.), language selection prompt, email verification process, etc. It also applies if the survey designer has configured no custom completion behavior and only the default completion message is being shown.
    .access = 'respondent' and .where = 'web'

  • response
    .type is set to 'response' when an administrator is logged in an viewing a respondent's survey.
    .access = 'admin' and .where = 'web' or 'print'

  • email
    .type is set to 'email' when an email message is being generated. Currently this can occur during the invitation and email verification process. The exact type of email will be available in email.type when this occurs.
    .access = 'respondent' and .where = 'email'

  • preview-question
    .type is set to 'preview-question' when a survey creator is previewing a question or page of the survey from their account.
    .access = 'admin' and .where = 'web'

  • publish-method
    .type is set to 'publish-method' when a survey designer is requesting a publication method (such as DHTML Popup from the Link Publication). Variables will be set in publishmethod. to inform the template designer of the method's type and template variables.

survey.config.display.where

This variable has three possible values that describe what type of screen you should output for:

  • web
    .where is set to 'web' when the page is to be viewed in a web browser.

  • print
    .where is set to 'print' when the page is to be viewed in a web browser, but ultimately printed. This allows you to use simplified formatting that will look best on a printed page.

  • email
    .where is set to 'email' when the output is to be viewed in an email client.