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.
Many users like to use our default answers feature to pre-populate their survey. Often they wish to make this field appear as read only so that the respondent cannot change the answer. While this is not a built-in feature, we do have some easy-to-use JavaScript that allows you to make one of the following question types read only.
Once you have your survey set up you will use one of the following scripts below depending on your question type. To add this to your survey click Add New Action > JavaScript.
$(document).ready(function(){
// makes an essay question with the CSS class name "roessay" readonly
$(".roessay").find("textarea").attr("disabled",true);
});
$(document).ready(function(){
// makes a checkbox question with the CSS class name "rocheckbox" readonly
$(".rocheckbox :checkbox").attr("disabled",true);
});
$(document).ready(function(){
// makes a radio button question with the CSS class name "roradiobutton" readonly
$(".roradiobutton :radio").attr("disabled",true);
});
$(document).ready(function(){
// makes a dropdown menu question with the CSS class name "rodropdownmenu" readonly
$(".rodropdownmenu select").attr("disabled",true);
});
If you need to disable all the above question types you can copy this script and make sure to use the appropriate CSS Class Names to disable each question. Learn how to add a Class Name to your question.
$(document).ready(function(){
// makes a textbox question with the CSS class name "rotextbox" readonly
$(":text").attr("disabled",true);
// makes an essay question with the CSS class name "roessay" readonly
$(".roessay").find("textarea").attr("disabled",true);
// makes a checkbox question with the CSS class name "rocheckbox" readonly
$(".rocheckbox :checkbox").attr("disabled",true);
// makes a radio button question with the CSS class name "roradiobutton" readonly
$(".roradiobutton :radio").attr("disabled",true);
// makes a dropdown menu question with the CSS class name "rodropdownmenu" readonly
$(".rodropdownmenu select").attr("disabled",true);
});