admin管理员组文章数量:1026087
I haven't played with any coding in years and I am struggling with understanding the template that Qualtrics provided for disabling the "Next Button" in a survey. The "Next Button" doesn't have to be disabled entirely (could be colored white). Since the survey is for research purposes, I need to keep the button from distracting participants on timed questions.
These are the two pages that I have looked at for coding.
.html
If you have a better way to code this, or could explain the coding outline in greater depth for me, I'd appreciate the help.
I haven't played with any coding in years and I am struggling with understanding the template that Qualtrics provided for disabling the "Next Button" in a survey. The "Next Button" doesn't have to be disabled entirely (could be colored white). Since the survey is for research purposes, I need to keep the button from distracting participants on timed questions.
These are the two pages that I have looked at for coding.
https://s.qualtrics./WRAPI/QuestionAPI/classes/Qualtrics%20JavaScript%20Question%20API.html
https://www.qualtrics./wp-content/uploads/2011/07/Qualtrics-Question-API.pdf
If you have a better way to code this, or could explain the coding outline in greater depth for me, I'd appreciate the help.
Share Improve this question asked Feb 10, 2017 at 20:45 Mary WMary W 131 silver badge5 bronze badges3 Answers
Reset to default 5A couple of things:
Due to a recent change in Qualtrics, Anthony's solution doesn't always work in JFE. Sometimes the JS runs before the buttons are present. The solution is defer hiding the buttons:
Qualtrics.SurveyEngine.addOnload(function() { function hideEl(element) { if($(element)) $(element).hide(); } hideEl.defer('NextButton'); });
To eliminate the brief button flash while waiting for JS to do its thing, you can add a style tag at the end of the question text instead:
<style> #NextButton {display:none;} </style>
This can be done by including the following line of JavaScript in the questions JS editor:
$('NextButton').hide();
There is a way around the "flashing" issue:
You can simply time the response to your question, and in you timing option, just specify the "next" button not to appear before XX seconds (e.g., since my questions do not take more than a few seconds, I have set the "Enable submit after (seconds)" to 60 seconds.
You still need to specify in the JS that clicking an option or clicking a particular letter will move you to the next question. Like for example:
Qualtrics.SurveyEngine.addOnload(function()
{
var that = this;
this.questionclick = function(event,element){
if (element.type == 'radio') {
that.clickNextButton();
}
}
});
Importantly, make sure that in the "Look & Feel" options, you don't have anything in the "Number of questions per page" (as the timing is considered as a question) and that you insert page breaks between each "question&timing".
I hope this helps.
I haven't played with any coding in years and I am struggling with understanding the template that Qualtrics provided for disabling the "Next Button" in a survey. The "Next Button" doesn't have to be disabled entirely (could be colored white). Since the survey is for research purposes, I need to keep the button from distracting participants on timed questions.
These are the two pages that I have looked at for coding.
.html
If you have a better way to code this, or could explain the coding outline in greater depth for me, I'd appreciate the help.
I haven't played with any coding in years and I am struggling with understanding the template that Qualtrics provided for disabling the "Next Button" in a survey. The "Next Button" doesn't have to be disabled entirely (could be colored white). Since the survey is for research purposes, I need to keep the button from distracting participants on timed questions.
These are the two pages that I have looked at for coding.
https://s.qualtrics./WRAPI/QuestionAPI/classes/Qualtrics%20JavaScript%20Question%20API.html
https://www.qualtrics./wp-content/uploads/2011/07/Qualtrics-Question-API.pdf
If you have a better way to code this, or could explain the coding outline in greater depth for me, I'd appreciate the help.
Share Improve this question asked Feb 10, 2017 at 20:45 Mary WMary W 131 silver badge5 bronze badges3 Answers
Reset to default 5A couple of things:
Due to a recent change in Qualtrics, Anthony's solution doesn't always work in JFE. Sometimes the JS runs before the buttons are present. The solution is defer hiding the buttons:
Qualtrics.SurveyEngine.addOnload(function() { function hideEl(element) { if($(element)) $(element).hide(); } hideEl.defer('NextButton'); });
To eliminate the brief button flash while waiting for JS to do its thing, you can add a style tag at the end of the question text instead:
<style> #NextButton {display:none;} </style>
This can be done by including the following line of JavaScript in the questions JS editor:
$('NextButton').hide();
There is a way around the "flashing" issue:
You can simply time the response to your question, and in you timing option, just specify the "next" button not to appear before XX seconds (e.g., since my questions do not take more than a few seconds, I have set the "Enable submit after (seconds)" to 60 seconds.
You still need to specify in the JS that clicking an option or clicking a particular letter will move you to the next question. Like for example:
Qualtrics.SurveyEngine.addOnload(function()
{
var that = this;
this.questionclick = function(event,element){
if (element.type == 'radio') {
that.clickNextButton();
}
}
});
Importantly, make sure that in the "Look & Feel" options, you don't have anything in the "Number of questions per page" (as the timing is considered as a question) and that you insert page breaks between each "question&timing".
I hope this helps.
版权声明:本文标题:javascript - Selectively disabling "Next Button" in Qualtrics for specific questions - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745625810a2159852.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论