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. 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...
  2. submitsurveycomplete

    This function submits the data on the current page and records the response as complete. All data collected on previous pages will be stored for reporting. Note: This function will not submit the current page and move to the next. To do that, use...
  3. resultsquestionaverage

    This function returns the average answer for the given question ID from all c omplete responses that have been processed . The average that is returned will not include data from any responses that haven't been processed; this includes the current...
  4. newpagepdf

    This function creates a new page in the given pdf. For more info on PHP PDF Creation visit: https://github.com/rospdf/pdf-php/blob/master/readme.pdf Parameters Description Required pdf The title of the PDF you are creating. tr...
  5. Pipe Radio Button Grid to Checkboxes

    This script pipes from a Radio Button Grid to a Checkbox question which is not supported with the built-in piping options. This script will work to pipe (conditionally or unconditionally) from a Radio Button Grid question into any question with a li...
  6. checkboxtotalchecked

    This function returns the number of checkboxes selected for the given question. See this function in action in an example survey . Parameters Description Required questionID the ID of the question true Example In the below e...
  7. runaction

    This function causes the given action to run and returns true if it is successful (returns false if given questionID is not an action). Parameters Description Required questionID the ID of the question true Example runaction(2...
  8. getquestionruntimeproperty

    This question returns the specified runtime property for the given question ID. See this function in action in an example survey . Parameters* Description Required questionID the ID of the question true property the property...
  9. removecontactfromlist

    This function removes a contact from an Email List . Parameters Description Required listID the ListID of your email list. You can find the List ID in your URL by going to Account > Email Lists and clicking into the email list. Yo...
  10. Other Textbox: Hide until other option is selected

    In this tutorial we'll cover how to display an Other Textbox in a Radio Button or Checkbox question only after the option has been clicked.  This script is compatible with multiple Other Textboxes in the same question. See the script in acti...