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

    This function sets the specified runtime property for the given question. See this function in action in an example survey . Parameters* Description Required questionID the ID of the question true property the property you wish to...
  2. Show a Number of Randomly Selected Pages from a Survey

    As part of our core randomization options, you have the ability to display x number of random questions on the page. Unfortunately, there is not a built-in way to do the same with pages in a survey. Never fear!  Fortunately, it's pretty easy to scri...
  3. 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...
  4. Randomization: Show a random set of Text/Instruction fields

    You may have noticed that when setting up your survey page to randomly show a set of questions , Text/Instruction fields are not included! But of course, there's always JavaScript! See the script in action in an example survey ! OR Add a surve...
  5. Pipe Checkbox Grid to another grid

    This example script works for conditional piping from a Checkbox Grid question to any other Grid question, as all Grid questions in Alchemer have the same structure, with each row corresponding to a separate questionID. In this example script, we a...
  6. Record time spent on page or survey in milliseconds

    We have a built-in feature for recording time spent on a survey page in seconds within a Hidden Value. If you wish to be more precise by recording the time spent in milliseconds you can do so with a little bit of JavaScript and Custom Scripting. ...
  7. Buttons: Target a specific page with the back button

    Customers frequently request the ability to have the back button target a specific page. Though this is not a built-in feature, we do have a script for that! In our survey below if you click the back button you will be sent to the Thank You Page.  ...
  8. Scripting with Question Aliases

    You can use question Aliases in place of question ID almost universally in scripting and merge codes. Why aliases are much better to use in scripts You can use aliases in your script that mean something.  Your scripts can be re-used more easil...
  9. Pipe Radio Button Grid to another grid

    This example script can works for conditional piping from a Radio Button Grid question to any Grid question, as all grid questions in Alchemer have the same structure, with each row corresponding to a separate question id. In this example script, w...
  10. Checkboxes: Set max answers dynamically

    Often survey builders wish to set the maximum answers a respondent can provide to a checkbox question dynamically based on the value entered in a previous Textbox question. You can achieve this, both for Checkbox questions on the same page and later...