Script Editor

In the Script Editor, you can add scripts to a survey.

Tip: In many cases, the functionality that was achieved through power survey scripting is now possible in modern surveys, either through out-of-the-box features or modern survey scripting.
  • Are you using scripting with power surveys to pipe/hide/mask answer options from one question to another question? You can now do this in surveys with no need for scripting. For more information, see Carry Forward Answers.
  • For more information about how modern survey scripting works and what is possible, see Scripting in surveys.
  • Refer to the Modern Survey Script Library for copy/paste code snippets and step-by-step instructions that address popular use cases.
The Script Editor is available anywhere you can add scripts, including:
  • Questions
  • Entry quotas

The added scripts apply to all the languages of the community, unless the script specifically excludes some of them.

Note: CSS and JavaScript are not supported for mobile surveys.

Script types

Depending on which area of the application you are in, there are different types of script that you can add.

Type Description
On Load On Load scripts are used primarily for hiding question elements such as rows in a grid. The script runs before the question is displayed to a participant.
On Validate

On Validate scripts are used primarily to create custom messages in questions. For example, if participants enter a response in the wrong format, a message could appear that indicates the error and requires them to re-enter their response.

This script runs when participants click Next. If there is no Next button, the script runs when participants enter an answer and the survey is about to move to the next question.

On Exit On Exit scripts are used primarily to set hidden questions. The script runs after participants finish answering a question and move on to another question.
JavaScript JavaScript is used to create custom behavior in the survey and to create processes that run behind the scenes. For example, you can write a script that enlarges images when participants click them.
Style Style refers to Cascading Style Sheets (CSS) that can be added to the survey. Add CSS to create custom formatting for the questions.

Accessing the Power Survey Script Library

The Power Survey Script Library contains scripts that Alida has developed and tested to work with your power survey. To access the Power Survey Script Library:

  1. In the upper right corner of the application, click the user account icon and select Help.

  2. Open the Alida Help Center.
  3. Click Getting Started and refer to these articles listed under Knowledge Base: