Javascript
Help Center

FluidSurveys Help > Question Types & Settings > Advanced Questions

Javascript

The JavaScript question type allows advanced users to add custom JavaScript to their survey.

The JavaScript question type allows you to:

  • Collect your JavaScript code into a single place for each page of your survey, making it easier to locate and work with.
  • Use a built-in JavaScript editor with syntax highlighting,
  • Easily modify the core components of the question types on your current survey page.
  • Administrators can show/hide the JavaScript code in preview mode.
This question type has the potential to cause serious error to your survey if the individual does not fully understand JavaScript. Please be careful when making any changes to your survey when adjusting the JavaScript.

Figure 1 - Javascript Question Type

Editor Functions

SettingDescription
1. Expand Code AreaIncreases the coding area size.
2. Toggle Builder WindowShow & Hide the JavaScript builder.
3. UndoUndo the last action.
4.RedoRedo the last action.
5. ClearClear all code.
6. ScriptAll JavaScript code goes here.
7. PiperPipes identifiers from your survey into your JavaScript code.

Figure 2 - Javascript Question - Options

Options

SettingDescription
Limit PiperUse a simplified piper list. Selected by default.
Remove Question IDsLimit piper list to piped variables and question. Selected by default

Display

SettingDescription
Extra ClassesUsed to add extra classes to your question. These can be used as selectors from javascript or CSS