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.
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
- Legacy Custom Scripting (Only available to accounts created before September XX, 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.