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.


[article("bodfy")]

When you have survey pages with open text fields, it's possible for a survey respondent to submit the page by accidentally pressing the Enter key before completing their response. With this bit of code, you can ensure that won't happen!

Place this code in the theme of your survey. To do so go to the Style tab and scroll to the bottom of the survey preview to access the HTML/CSS Editor. Paste the following code below the existing HTML on the Custom HTML tab.

<script>
$(document).ready(function(){
  $("form :input:not(textarea)").on("keypress", function(e) {
    return e.keyCode != 13;
});
$("form :input:not(textarea)").on("keydown", function(e) {
    return e.keyCode != 13;
});
});
</script>

This code works best when applied to the whole survey but could also be applied to a single page using a JavaScript action. If you choose to use the JavaScript action on an individual page, make sure you don't have the desktop interaction set to one at a time.