Important Update to Custom Scripting
SurveyGizmo's CustomScript Action now supports the LUA programming language.
Please visit the Lua 5.1 Reference Manual for syntax and examples.
Coming Soon: Documentation of Lua functions that can be used in SurveyGizmo.
- Any previous/existing Custom Scripts will continue to operate without issue.
- New CustomScript Actions allow use of either the Legacy Custom Scripting (PHP-based) programming language or the LUA programming language.
SurveyGizmo provides a library of functions, including many useful PHP functions, available for you to interact with a survey programmatically. If you are familiar with PHP, this should be relatively easy for you to pick up!
Learn more about Custom Scripting here:
Adding a Custom Script to Your Survey
To add a custom script action to your survey,
- 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 action is doing in the name, 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 current options:
- Custom Scripting
- 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.