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

    This function returns the response count for the given question ID from all responses that have been processed . The response count that is returned will not include data from any responses that haven't been processed; this includes the current res...
  2. addcontacttolist

    This function adds a new contact or updates an existing contact inside of an  Email List (as opposed to an email campaign). Email Lists allow account administrators to manage contacts for email lists at the account level rather than the campaign le...
  3. 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...
  4. 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...
  5. 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 ...
  6. Merge Codes: Set default values when empty

    Some merge codes support a default attribute that allows you to set a default value to display when the merge code is empty.  The following merge codes support the built-in default attribute. [question("value"), id="3"]  [question("option title"...
  7. Buttons: Change text of a button on a specific page

    While we have a built-in feature to change the text of the Back, Next, and Submit buttons for the Back and Next buttons you may not wish to change the text on every page. You can change the text of a Next and Back buttons on a per-page basis with ...
  8. getrespondentsessionid

    This function returns the session ID for the current response. Session ID is a unique, randomly generated string used to identify the respondent's survey session. Example session = getrespondentsessionid() print(session) The output would be: 139...
  9. setpipevalues

    This function question pipes the given question based on the values specified in the array parameter. See this function in action in an example survey . Parameters* Description Required questionID the ID of the question true ...
  10. getpipevalues

    This function returns an of array the piped values for the given question-piped question. For multi-select questions, an array will be returned. See this function in action in an example survey . Parameters Description Required quest...