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. Pipe from Checkboxes to a grid

    In this scenario, our custom script filters the grid rows of a target question based on any corresponding, selected options in the source checkbox question. Normally, it would be fine to use standard piping, but here the source question contains op...
  2. Pipe two questions into one

    Piping is a great way to use a respondent's answers from one question in a survey in another question on a later page. But what if you want to pipe from not one, but two or more questions into one question on a later page? We have a workaround that...
  3. submitsurveycomplete

    This function submits the data on the current page and records the response as complete. All data collected on previous pages will be stored for reporting. Note: This function will not submit the current page and move to the next. To do that, use...
  4. isanswered

    This function returns a Boolean true if the given question has been answered. Parameters Description Required questionID the ID of the question true Limitations isanswered is not supported for the following question types. ...
  5. Miscellaneous Functions

    This mixed bag of functions allows for things like checking whether a question is answered (see isanswered ) or submitting the survey response (see submitsurvey and submitsurveycomplete ). ...
  6. 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...
  7. 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...
  8. listreplace

    This function replaces the given response for the given survey with the array items. This is equivalent to updating a SurveyResponse object via the RestAPI. To learn more visit the SurveyResponse API Object documentation. Parameters* Descrip...
  9. listadd

    This function posts a response to the given survey using the array of items. This is equivalent to creating a SurveyResponse object via the RestAPI. To learn more visit the SurveyResponse API Object documentation. Parameters* Description Req...
  10. getqueryresponsecount

    This function returns the number of responses (completes) that have been collected for the current survey. It takes an optional urlvar_key=value parameter that filters by a URL variable. urlvar_key=value should be in the following format: "urlvar_ke...