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:
- Event
lighthouseResponseChangedthat fires when a response changes. - Events
lighthouseRadioButtonChangedandlighthouseCheckboxChangedthat fire when graphical or non-graphical radio buttons or checkboxes change state. - Functions
SSI_EnableRadioButtonOrCheckbox,SSI_DisableRadioButtonOrCheckbox, andSSI_ToggleRadioButtonOrCheckboxfor enabling and disabling graphical and non-graphical radio buttons and checkboxes. - Functions
SSI_GetQuestionList,SSI_GetGridRowList, andSSI_GetGridColumnListfor getting list items of questions. - Function
SSI_GetStudySettingsfor getting key study settings. - Function
SSI_GetGridQuestionSettingsfor getting key settings of a grid question. - Function
SSI_GetFreeFormatQuestionSettingsfor getting key settings of a free format question. - Function
SSI_GetAcbcByoQuestionSettingsfor 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.

Step 3: Add the Better Lighthouse Library to Your Survey
- Open Lighthouse Studio.
- Click "Add" (as you would to add any normal question).
- 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
- Click on the Better Lighthouse Library question.
- Copy all the code inside the footer.
- Paste this code into the HTML head section, which can be found in the Survey Settings.


Step 5: Update Security Headers
- Navigate to the Security tab in the Survey Settings.
- Enable Custom Security Headers.
- Modify the security header code based on your Lighthouse version:
- 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'.
- In version 9.15.2 and above, look for 'strict-dynamic' and replace that with 'strict-dynamic' 'unsafe-eval'.

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.