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

    This function returns the value of a query string variable passed into the survey where urlkey is the URL variable key.   Note: URL variable keys are stored as all lower case in our system.  Parameters Description Required urlkey...
  2. getquestionproperty

    This function returns the given property for the given question ID. Parameters* Description Required questionID the ID of the question true property the property you wish to lookup true *Provide parameters in the above o...
  3. Get Started with Custom Scripting

    There are five categories of custom scripting functions available:  Survey Getter Functions - Survey getter functions allow you to fetch various values throughout the survey. Survey Setter Functions - Survey setter functions allow you to s...
  4. Survey Customization Scripts

    These survey customization scripts cover commonly requested functionality that is not available out of the box.
  5. Disqualification Scripts

    These disqualification scripts cover commonly requested disqualification functionality that is not available with our built-in disqualification feature.
  6. Prevent respondents from selecting text

    In some circumstances, users do not want their respondents to be able to select text. This tutorial provides some JavaScript to help prevent that.  See the script in action in an example survey ! OR Add a survey with this script and setup to y...
  7. 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...
  8. Radio Button Grid: Only allow one selection

    Radio Button Grid questions allow a single selection per row. Some customers have requested the ability to allow only a single selection for the entire grid. While we don't have a built-in way to achieve this, you can set this up pretty easily wit...
  9. 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...
  10. Cascading Dropdown: Select option when only one is present

    If you are using the Cascading Dropdown question and one of your menus has only one option you might want to have the survey automatically select it for your respondents. While there isn't a built-in way to achieve this; we have a super-simple, co...