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 Boolean true if the given question has been answered.
Parameters
Description
Required
questionID
the ID of the question
true
Limitations
isanswered is not supported for the following question types. In most cases, subquestion IDs can be used in place of the overall question ID in order to evaluate whether each row or subquestion has been answered.
Radio Button Grid - Use row IDs in place of overall question ID.
Star Rating Grid - Use row IDs in place of overall question ID; only supported for single-column Star Rating Grids.
Checkbox Grid - Use row IDs in place of overall question ID.
Dropdown Menu List - Use row IDs in place of overall question ID.
Video Sentiment - Not supported.
Audio Sentiment - Not supported.
Conjoint - Not supported.
Grouping Quick Sort - Use item IDs in place of overall question ID.
Grouping Closed Sort - Use item IDs in place of overall question ID.
Dropdown Menu Grid - Use row IDs in place of overall question ID; only supported for single-column Dropdown Menu Grids.
Textbox Grid - Use row IDs in place of overall question ID; only supported for single-column Textbox Grids.
Semantic Diff - Use row IDs in place of overall question ID.
Max Diff - Not supported.
Contact Form - Use subquestion IDs instead.
Custom Group - Use subquestion IDs instead.
Custom Table - Not supported.
Example
In this example, we return whether question ID 2 is answered.
print(isanswered(2))
Output would be 1 if answered and null if unanswered.
In this example, we use isanswered to determine if the indicated question ID is answered and then, using submitsurveycomplete, we mark the survey as complete.