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.


Popular Articles

  1. getvalue

    This function returns the value (reporting value) of an answered question (or null, if not answered). For single answer questions, a single value is returned. Multi-answer questions return an array. Grid and custom group questions return a multidime...
  2. setrequired

    This function toggles the required status of a question. Parameters* Description Required questionID the ID of the question true true/false true hides the question and false shows the question false (default is true) *P...
  3. settitle

    This function sets the title of a question. HTML is supported. The language parameter is a required parameter. The possible values for the language parameter values are the languages available in the translation menu . Languages must be title c...
  4. Randomization: Keep two options together

    When randomizing answer options customers often wish to keep to options together. That is, they wish for the options to randomly move about in the list of all answer options, however, they want them to remain together as a group. While we don't have...
  5. Get Started

    The application supports two kinds of scripting actions in surveys: Custom Script Actions (using LUA version 5.1.4) and JavaScript Actions . You can add each to your survey by adding the script to either a Custom Script or JavaScript action respe...
  6. setvalue

    This function populates the response value of the given question. If you wish to set the value of an other textbox use the setothervalue function. Parameters* Description Required questionID the ID of the question true value the v...
  7. Survey Getter Functions

    Survey getter functions allow you to fetch various values throughout the survey. getvalue and its corresponding survey setter function setvalue are the workhorses of the custom scripting. Note: There are several getters and setters under the L...
  8. Email respondent a certificate

    This script allows you to create a certificate to email to survey/quiz respondents.  See the script in action in an example survey ! OR Add a survey with this script and setup to your account! Estimated implementation and testing time:  30-6...
  9. Logic, Piping, & Randomization Functions

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

    This function returns the title of a question. Using the language parameter you can return the title in the given language. The possible values for the language parameter values are the languages available in the translation menu . Languages mu...