Better Lighthouse Library

Zachary Anderson
Last updated: 12 Aug 2025
Written for: Lighthouse Studio 9.3

Description

The Better Lighthouse Library adds a series of custom functions and events that enables us to create the custom questions available in the Sawtooth Question Library. 

Below are the new functions and events added by the Better Lighthouse Library: 

  • EventlighthouseResponseChanged that fires when a response changes. 
  • EventslighthouseRadioButtonChanged and lighthouseCheckboxChanged that fire when graphical or non-graphical radio buttons or checkboxes change state. 
  • FunctionsSSI_EnableRadioButtonOrCheckbox , SSI_DisableRadioButtonOrCheckbox, and SSI_ToggleRadioButtonOrCheckbox for enabling and disabling graphical and non-graphical radio buttons and checkboxes. 
  • FunctionsSSI_GetQuestionList, SSI_GetGridRowList, and SSI_GetGridColumnList for getting list items of questions. 
  • FunctionSSI_GetStudySettings for getting key study settings. 
  • FunctionSSI_GetGridQuestionSettings for getting key settings of a grid question. 
  • FunctionSSI_GetFreeFormatQuestionSettings for getting key settings of a free format question. 
  • FunctionSSI_GetAcbcByoQuestionSettings for getting key settings of an ACBC BYO question. 

Set-up instructions

Step 1: Download the Better Lighthouse Library File

Step 2: Move Files to the Correct Directory

Extract the downloaded .zip files and place the Better Lighthouse Library folder inside the My Library folder within your Sawtooth Software directory.

Library Directory Breadcrumbs

Step 3: Add the Better Lighthouse Library to Your Survey

  1. Open Lighthouse Studio. 
  2. Click "Add" (as you would to add any normal question).
  3. Select "My Library", then choose Better Lighthouse Library and add it to your survey.

Step 4: Copy and Paste the Footer Code into the HTML Head Section

  1. Click on the Better Lighthouse Library question.
  2. Copy all the code inside the footer.
  3. Paste this code into the HTML head section, which can be found in the Survey Settings. 

Lhs Better Library Question Footer Text

HTML Head Settings Area

Step 5: Update Security Headers

  1. Navigate to the Security tab in the Survey Settings.
  2. Enable Custom Security Headers.
  3. Modify the security header code based on your Lighthouse version:
    1. In versions 9.12.0 through 9.15.0, look for default-src 'self' 'unsafe-inline' and replace that with default-src 'self' 'unsafe-inline' 'unsafe-eval'. 
    2. In version 9.15.2 and above, look for 'strict-dynamic' and replace that with 'strict-dynamic' 'unsafe-eval'.

Security Header Code Section

Notes:

  • You can remove or change any of the main features of this tool/library. But doing that might break or change how certain parts of the page behave—especially if there’s JavaScript code that depends on those features. This might also affect other parts of the library. So be careful when making changes.