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. Radio Button Grid: Allow one answer per column

    While we have a Ranking Grid question that automatically validates for a single answer per column there are some scenarios where you might wish to apply this type of validation to a Radio Button Grid question. For example, in a Ranking Grid que...
  2. settableorderbytable

    This function accepts two table Question IDs and orders the rows of the table in tableID by the table in refID. This allows you to maintain randomization order across tables in your survey. The row headers for both tables must be identical. See thi...
  3. 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())
  4. Sort options alphabetically

    If you have a need to alphabetize your answer options, say, for instance, you have a list of states or countries we have a handy feature that allows you to set your answer options to alphabetize . This works to alphabetize answer options in Radio B...
  5. listremove

    This function removes the given response from the given survey. This is equivalent to deleting a SurveyResponse object via the RestAPI. To learn more visit the SurveyResponse API Object documentation. Parameters* Description Required su...
  6. Pipe from Checkboxes to a grid

    In this scenario, our custom script filters the grid rows of a target question based on any corresponding, selected options in the source checkbox question. Normally, it would be fine to use standard piping, but here the source question contains op...
  7. Radio Buttons: Disable option once selected

    While we do have a built-in feature that will hide a question once it is answered . This JavaScript will allow you to still display the question but not allow changes. It works with Radio Button questions and Radio Button Grids .   See the scri...
  8. translate

    The translate function creates a translation field for the specified string in the Text & Translation interface for each language version of your survey. The field is then available for each language in the Text & Translations interface to be tran...