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
- New accounts (created after October 29, 2018) only will have the option to use Lua in scripts.
- 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.
- In the future, any Legacy Custom Scripting Actions will be switched to read-only.
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. SurveyGizmo provides a library of functions available for you to interact with a survey programmatically.
Add a Custom Script to your survey
To add a custom script action to your survey follow these steps:
- Click the Action button at the bottom of any page in your survey.
- Give your action a name. It's a good idea to describe what the script is doing, for example, "Disable after answering."
- Select Custom Script from the menu. You will be taken to the script editor.
- Select the type of script that you will be writing. There are two options:
- Lua - default (version 5.1.4)
- Legacy Custom Scripting (Only available to accounts created before October 29, 2018)
- Write or paste your script into the Script Code field. If you need to reference page, question or option IDs to use in your scripts, use the Question & Page ID Lookup menu. This menu is for reference only, clicking on the IDs within the menu will not insert them into your scripts.
Using Logic in Custom Script Actions
On the Logic tab you can set up conditions for when you want your script action to run. This is configured in the same way as Question Logic.
Change the Script Editor Look & Feel
If you want to change the look of the script editor, you can choose a different color scheme on the Advanced tab of your action.
Admin
— Dave Domagalski on 11/12/2019
@Jerry: Thank you for your question!
At this time, we have not set a definitive date for when Legacy Custom Scripting will be retired. We will certainly communicate that date well in advance.
David
Technical Writer
SurveyGizmo Learning & Development
— Jerry on 11/12/2019
Is there a definitive date when the Legacy Scripting will not work anymore?
Admin
— Dave Domagalski on 09/09/2019
@Viv: Thank you for your question!
I'm sorry for the trouble! Yes, custom scripts do work when taking surveys on mobile devices.
David
Technical Writer
SurveyGizmo Learning & Development
— Viv.harrison on 09/09/2019
I'd hoped to find out if custom script works when taking surveys on mobiles - but can't find that answer!