SurveyGizmo's CustomScript Action now supports the LUA programming language.
Legacy Custom Scripting Language Deprecation Plans
New accounts (created after October 29, 2018) will only 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 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.
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.
Answer options, questions, pages, and surveys have unique identifiers that can be referenced in your scripts.
Survey ID
To get the Survey ID, look at the URL bar while you're in the survey Build tab. The number that follows /id/ is your survey ID.
Customizing Your Build Tab to Display IDs
Question and Page IDs are available on the Build tab. Click the link to View Settings link found above Page One of your survey. Select Page IDs and Question IDs,then click Apply.
After these view settings are applied your Question IDs and Page IDs will display throughout the survey. Page IDs will be visible directly to the right of your page title.
Question IDs will be visible under every survey question.
Using the Survey Legend to Obtain IDs
If you are looking to access all IDs at once, use the Survey Legend available under the Tools Menu. This will display Question IDs and Option IDs (a.ka. SKUs) as well as other metadata about your survey elements.
Using the ID Lookup Tool to get IDs within Your Custom Scripting Action.
While there is an option to eliminate the use of IDs that change across surveys (see our tutorial on Custom Scripting with Question Aliases), you'll likely still need to access page, question and option IDs when writing scripts.
Within your custom script action, you can use the Question & Page ID Lookup tool to get all of the IDs for your scripts.
Simply click the dropdown and scroll to the question, page, or option you wish to use in your script. When you select it, that page, question or option ID will display just above your script, for reference.
Alright, so how do I use this in a script?
If you're familiar with our merge code helper that is available throughout the Build tab for dynamically merging in the proper merge code with the appropriate ID based on the question you select you might expect this dropdown to work similarly. Unfortunately, this will not insert the ID at your cursor. This is basically just a display tool to give you quick access to the IDs you need in your scripts. You'll still need to key the ID value within your scripting function as necessary.