Lua Scripting Resources

Important Update to Custom Scripting

SurveyGizmo's CustomScript Action now supports the LUA programming language.


Legacy Custom Scripting Language Deprecation Plans 

  1. New accounts (created after October 29, 2018) will only have the option to use Lua in scripts.
  2. As of October 29, 2018 Custom Scripting Actions will default to Lua as the scripting type in the Custom Scripting Action for accounts created before this date. You will be able to switch to the Legacy Custom Scripting; though we highly encourage using Lua.
  3. In the long term, Legacy Custom Scripting Actions will be switched to read-only. Read-only scripts will continue to function; you will just be prevented from editing. The exact date on this is to be determined; we will send notifications well ahead of time.


 Go to our Legacy Scripting Documentation.

While SurveyGizmo is one of the most flexible survey tools around, we get requests for customizations that are not available out of the box. This is where JavaScript and Custom Scripting can save the day. If you have scripting chops you can use the JavaScript action or the Custom Scripting action to achieve the survey of your dreams.


New Articles

  1. PDF Functions

    PDF functions allow you to build custom PDFs within a response. These functions are often paired with email action functions to send a custom PDF upon response submission.
  2. Get Started with JavaScript

    What Can I Do With JavaScript? The possibilities are endless. Check out the Working Examples of JavaScript .
  3. Using CSS Classes in JavaScript

    When you are writing Javascript in SurveyGizmo and need to interact with the DOM, the most straightforward option is often to use the IDs of the specific elements that you are interacting with. For example, here is the HTML for an individual textbo...
  4. How to Find JavaScript Element IDs

    If you're using JavaScript you'll eventually need to find out your element ID. You'll need to take advantage of your browser's developer tools. Developer tools for each browser vary. Learn how to access developer tools on your preferred browser. ...
  5. How to Find IDs for Custom Scripts

    Answer options, questions, pages, and surveys have unique identifiers that can be referenced in your scripts.  Survey ID To get the Survey ID, look at the URL bar while you're in the survey Build tab. The number that follows /id/ is your survey ...
  6. Logic, Piping, & Randomization Scripts

    Logic allows you to dynamically display/trigger questions or actions to survey respondents based on previous answers.  Piping is a great way to use a respondent's answers from one question in a survey in another question on a later page. However,...
  7. Get Started with Custom Scripting

    There are five categories of custom scripting functions available:  Survey Getter Functions - Survey getter functions allow you to fetch various values throughout the survey. Survey Setter Functions - Survey setter functions allow you to s...
  8. Scripting with Question Aliases

    You can use question Aliases in place of question ID almost universally in scripting and merge codes. Why aliases are much better to use in scripts You can use aliases in your script that mean something.  Your scripts can be re-used more easil...
  9. Results Functions

    Results functions allow you to fetch aggregate data to build custom quotas and customize other survey behavior. 
  10. Logic, Piping, & Randomization Functions

    These functions allow you to replicate and extend our built-in logic, piping/repeating, and randomization features.