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. Get Started with JavaScript

    What Can I Do With JavaScript? The possibilities are endless. Check out the Working Examples of JavaScript .
  2. hidequestion

    This function hides the specified question when set to true and shows the specified question when set to false. Parameters* Description Required questionID the ID of the question true true/false true hides the question and fa...
  3. Results Functions

    Results functions allow you to fetch aggregate data to build custom quotas and customize other survey behavior. 
  4. Use Signature question later in the survey

    This script will allow you to use a signature question's input later in a survey. See the script in action in an example survey ! OR Add a survey with this script and setup to your account. Features and functions used in this script: Sig...
  5. Add two Continuous Sums into a third

    While there is no built-in functionality to populate a continuous sum question with previous continuous sum questions we have a script to accomplish this! This can come in handy if you have different totals that you want to add to make one overall t...
  6. allquestionsoftype

    This function returns an array of all the questions (of a particular type) on a particular page. Parameters* Description Required type the question type true pageid the ID of the page true *Provide parameters in the above order...
  7. 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 ...
  8. Using SurveyGizmo Merge Codes in JavaScript

    You can use SurveyGizmo merge codes in JavaScript actions in your survey. Our servers will replace the merge code with the corresponding value when the page is rendered. When the JavaScript code executes on the client side, the merge code will have ...
  9. setothervalue

    This function populates the response for other textboxes . If you wish to set the value of a question use the setvalue function. Parameters* Description Required questionID the ID of the question true reporting_value the reportin...
  10. setpagestartingnumber

    This function sets the number of the first question of the page (default is 1). You can use this script on each page to restart the question numbering on each page. See this function in action in an example survey . Parameters Description Re...