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.


Updated Articles

  1. Radio Buttons: Allow respondents to deselect

    Once an answer option has been selected in a radio button question browsers do not allow for the option to be deslected. That could be troublesome if it was an accidental click with no Other or N/A options, so here is a quick bit of JavaScript that ...
  2. Store past or future date and time

    Want to use a future or past date dynamically in a survey? This script adds or subtracts time to/from the current date.  See the script in action in an example survey OR Add a survey with this script and setup to your account. Features and ...
  3. Attach custom content files to an email

    Building and sending attachments with custom content is a very common customization achieved via custom scripting. To learn how to build a PDF file with custom content see our PDF Functions . The Scripts and Setup Once you've built your custom co...
  4. Update Hidden Values if answers are changed

    By default, hidden values do not update when respondents go back in a survey and change their answers. One way to solve this problem is to remove the Back button on a survey, but that still doesn't ensure that they can't click Back on their browser....
  5. evaluatemergecodes

    This function returns the value for the given merge code. Merge codes need to be wrapped in single quotes ' ' so that they are represented as strings. Parameters Description Required mergecode the merge code you wish to evaluate true ...
  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. Logic, Piping, & Randomization Functions

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

    As piping into rows of Textbox List questions is not available using the built-in piping feature, this script will query the answers from a source Checkbox question and filter the option list in a target Textbox List question accordingly. For this t...
  9. 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...
  10. Pipe Checkboxes to Slider List

    The built-in piping feature is not supported for Slider List questions. Fortunately, we can achieve piping in this question type via the custom script as illustrated here. For this to work the target question must be set up with slider row headers ...