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

    Converts the HTML provided in contents parameter to a PDF file. Parameters* Description Required contents the HTML you wish to send to pdf true landscape The array of data to include in the table. false (default is false) ...
  2. newpdf

    This function creates a PDF object that you can store, build and output and send via the emailsend function.  See this function and other PDF functions in action in an example survey . OR Add a survey with a script with this function and other...
  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. newpagepdf

    This function creates a new page in the given pdf. For more info on PHP PDF Creation visit: https://github.com/rospdf/pdf-php/blob/master/readme.pdf Parameters Description Required pdf The title of the PDF you are creating. tr...
  5. removecontactfrominvite

    This function removes the given emailaddress from the given invite as specified by link ID .  Parameters* Description Required linkID the linkID and can be found in your email campaign true emailaddress the email address to r...
  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. removecontactfromlist

    This function removes a contact from an Email List . Parameters Description Required listID the ListID of your email list. You can find the List ID in your URL by going to Account > Email Lists and clicking into the email list. Yo...
  8. addcontacttoinvite

    This function adds a contact with the specified fields to the given invite. This function allows you to collect contact information in one survey and then add those contacts to an email campaign in another survey.  Parameters Description Req...
  9. sethtmlemail

    This function sets the content of an HTML version of a send email action. Parameters* Description Required questionID the ID of the send email action for which you are specifying content true content the email content true ...
  10. 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...