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. csvsplit

    Splits the given comma-separated string into an array. Parameters Description Required string the comma-separated string you wish to split into an array true Example In the below example we create an array from a comma-separated li...
  2. currentpagesku

    This function will return the SKU (aka ID) of the current page. The below example outputs the current page SKU to the page. print(currentpagesku())
  3. getquestionresponsecount

    This function returns the response count for the given question ID from all responses that have been processed . The response count that is returned will not include data from any responses that haven't been processed; this includes the current res...
  4. getquestionoptions

    This function returns an array of options for the given question.  See this function in action in an example survey . Parameters* Description Possible Values Required questionID the ID of the question true type the value you w...
  5. hidepage

    This function hides or shows a page. See this function in action in an example survey . Parameters* Description Required pageID the ID of the page true true/false true hides the page, false shows the page true *Provi...
  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. getpipeskus

    This function returns an array of SKUs=>values for the given question-piped question. See this function in action in an example survey . Parameters Description Required questionID the ID of the question true For example, if we que...
  8. getquestionidbyalias

    This function returns the question ID by the "alias" assigned via the Build Tab. Learn more here . Parameters Description Required alias the alias you wish to lookup true The following example will output the question ID for ...
  9. setquestionproperty

    This function sets the given property to the given value for the given question. See this function in action in an example survey . Parameters* Description Required questionID the ID of the question true property the questi...
  10. 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...