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

    This function sets the given property to the given value 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 questi...
  2. Working Examples of JavaScript

    Get started with JavaScript! Learn how to script some of our most frequently requested survey customizations. These examples are built to plug and play. Template scripts like these are great for getting started with JavaScript.
  3. Survey Setter Functions

    Survey setter functions allow you to set various values throughout the survey. setvalue and its corresponding survey getter function getvalue are the workhorses of the custom scripting. Note: There are several getters and setters under the  Log...
  4. emailsend

    This function constructs and sends an email at the runtime of your custom script. Custom Script actions are run when the page is displayed. Parameters* Description Required to the recipient's email address true toname the recip...
  5. PDF Functions

    PDF functions allow you to build custom PDFs within a response. These functions are often paired with email action functions to send a custom PDF upon response submission.
  6. Email Campaign & Action Functions

    Functions that allow for managing Email Campaign contacts and sending emails within a response.
  7. setcolorpdf

    This function sets the text color for the given pdf.   See this function and other PDF functions in action in an example survey . OR Add a survey with a script with this function and otherPDF functions to your account. For more info on PH...
  8. tablepdf

    This function adds a table to the given PDF. See this function and other PDF functions in action in an example survey . OR Add a survey with a script with this function and otherPDF functions to your account. For more info on PHP PDF Creati...
  9. pdfoutput

    This function returns the output of your pdf. See this function and other PDF functions in action in an example survey . OR Add a survey with a script with this function and otherPDF functions to your account. For more info on PHP PDF Creat...
  10. How to Find JavaScript Element IDs

    If you're using JavaScript you'll eventually need to find out your element ID. You'll need to take advantage of your browser's developer tools. Developer tools for each browser vary. Learn how to access developer tools on your preferred browser. ...