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.


New Articles

  1. 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...
  2. Survey Response Functions

    The survey response functions leverage the SurveyGizmo API to list, add, remove, and replace survey responses.
  3. Get Started

    The application supports two kinds of scripting actions in surveys: Custom Script Actions (using LUA version 5.1.4) and JavaScript Actions . You can add each to your survey by adding the script to either a Custom Script or JavaScript action respe...
  4. PHP Functions

    There are a number of PHP functions that are available to leverage within your scripts. See the below list and reference the corresponding PHP function in the PHP Documentation: http://php.net/docs.php PHP functions available for use in SurveyGiz...
  5. Survey Getter Functions

    Survey getter functions allow you to fetch various values throughout the survey. getvalue and its corresponding survey setter function setvalue are the workhorses of the custom scripting. Note: There are several getters and setters under the L...
  6. setfontpdf

    This function sets the font and style of 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 ...
  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. 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...
  9. 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...
  10. textpdf

    This function adds text 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 Creation ...