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.
This function returns a count of answered questions on a given page.
Parameters*
Description
Required
Default
pageID
the ID of the page
true
type
the question type
false
Defaults to all questions on the page
*Provide parameters in the above order.
Type Possible Values*
Corresponding Survey Question
CASCADING_DROPDOWN
Cascading Dropdown Menu
CHECKBOX
Checkboxes
CONJOINT_NEW
Choice-based Conjoint
CONT_SUM
Continuous Sum
ESSAY
Essay/Long Answer
FILE
File Upload
GROUP
Contact Form and Custom Group (Groups are evaluated by subquestion such that each subquestion that is answered increments the return by 1.)
HEATMAP
Image Heatmap
IMAGE_SELECT
Image Select (Single and Multi)
MATRIX
Custom Table (Custom Tables are evaluated by subquestion such that each row and subquestion combination increments the return by 1.))
MAXDIFF
Max Diff
MENU
Dropdown Menu
MULTI_SLIDER
Slider List
MULTI_TEXTBOX
Textbox List
NPS®
Net Promoter Score®
RADIO
Radio Buttons, Likert (Rating)
RANK
Drag & Drop and Ranking Grid
REACTION
Audio and Video Sentiment
SIGNATURE
Signature
SLIDER
Slider
TABLE
Grid question types (Semantic Diff, Star Rating Grid, Radio Button Grid, Dropdown Menu List, Checkbox Grid, All Card Sorts, Dropdown Menu Grid ). Tables are evaluated by row/subquestion such that each row that is answered increments the return by 1.
TEXTBOX
Text fields including (textbox, number, percent, email, and date)
TEXTHIGHLIGHTER
Text Highlighter
*multiple type values can be specified as a comma-separated string.
Examples
In this example, we flag the survey as 'Complete' if at least 4 of the radio and checkbox questions on the first page have been answered.
questiontypes = "RADIO,CHECKBOX"
numberAnswered = questionsansweredonpage(1,questiontypes)
if (numberAnswered >= 4)
then submitsurveycomplete()
end
In this example, we output each of the question types.
Net Promoter®, NPS®, NPS Prism®, and the NPS-related emoticons are registered trademarks of Bain & Company, Inc., Satmetrix Systems, Inc., and Fred Reichheld. Net Promoter Score℠ and Net Promoter System℠ are service marks of Bain & Company, Inc., Satmetrix Systems, Inc., and Fred Reichheld.