Survey Tweaks Scripts

Important Update to Custom Scripting

SurveyGizmo's CustomScript Action now supports the LUA programming language. Visit our NEW Lua Scripting Resources!

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. The exact date on this is to be determined; we will send notifications well ahead of time.

Articles

Update Hidden Values if Answers Are Changed
By default, hidden values do not update when respondents go backwards in a survey and change their answers. One way to solve this problem is to remove the Back button on a survey, but that still doesn't ensure that they can't click Back on t...
Attaching Custom Content Files to an Email
Building and sending attachments with custom content is a very common customization achieved via custom scripting. To learn how to build a PDF file with custom content see our PDF Functions . Once you've built your custom content the are t...
Record Time Spent On Page or Survey In Milliseconds
We have a way to record time spent on page in seconds within a Hidden Value. If you wish to be more precise by recording the time spent in milliseconds you can do so with a little bit of JavaScript! Add a survey with these scripts to your a...
Store Past or Future Date and Time
Ever want to use a future or past date dynamically in a survey? We have just the workaround for you! In this tutorial we will cover adding or subtracting time to/from the current date.  Check it out in an example survey OR Add...
Email Respondent a Certificate
Need to create and email a personalized certificate to a respondent? No problem! After creating your own certificate image, upload the image to your SurveyGizmo file library, copy this script and paste it into a custom script action, modify t...
Update Hidden Value If Question Answers Do Not Match
We have a feature that will verify two textbox questions on the same page match (Example: Verify that the respondent enters the same email address twice).  This code snippet is used to check to see if the answers to any two questions in the ...
Performing Basic Math Using Scripting: Add, Subtract, Multiply, and Divide
Do you need to perform basic math within a response? You can do so using our custom scripting. Because our scripting language is based on PHP any of the operators that are available in PHP are available in our scripting language, and thus, in our su...