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.


Updated Articles

  1. 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...
  2. 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...
  3. imagepdf

    This function adds an image 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 Creat...
  4. 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 ...
  5. 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 ...
  6. Making a read-only field

    Many users like to use our default answers feature to pre-populate their survey. Often they wish to make this field appear as read only so that the respondent cannot change the answer. While this is not a built-in feature, we do have some easy-to-...
  7. 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...
  8. 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...
  9. getquestionoptions

    This function returns an array of options for the given question.  See this function in action in an example survey . Parameters* Description Possible Values Required questionID the ID of the question true type the value you w...
  10. 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 ...