Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Submitting answer after time-limit

  • Kaikelan_190010
  • Kaikelan_190010's Avatar Topic Author
  • Offline
  • Banned
  • Banned
More
4 years 10 months ago #184420 by Kaikelan_190010
Submitting answer after time-limit was created by Kaikelan_190010
Hi,

Perhaps someone here could help me: I'd like to have a visible countdown timer for my question that also allows the answer to be submitted after the countdown has ended. I've understood that this could be done in LimeSurvey but I'm not sure how exactly.

Right now I have a question group with 2 questions: one with a slider for providing the answer and another long free text -type question with a visible countdown timer and a hidden input field (the latter question is acting as timer for this question group - you can't have both a slider and a timer in same question).

Essentially, what I'm looking for could perhaps be a visible count-down timer without any action after time-limit.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 10 months ago #184440 by holch
Replied by holch on topic Submitting answer after time-limit
I don't think this is possible out of the box:
manual.limesurvey.org/QS:Time_limit

What you are looking for is not a time limit, but rather just a counter. Because you don't want the timer to have any effect.

I guess you probably could create a timer with Javascript and include it into your question, as when the timer runs out, nothing will happen.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • Kaikelan_190010
  • Kaikelan_190010's Avatar Topic Author
  • Offline
  • Banned
  • Banned
More
4 years 10 months ago #184577 by Kaikelan_190010
Replied by Kaikelan_190010 on topic Submitting answer after time-limit
Thank you,

Anyone having a working example of this and would also like to share that would be much appreciated!
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 10 months ago #184587 by DenisChenu
Replied by DenisChenu on topic Submitting answer after time-limit
Alternative : use another question with "disable only" with timer.
This disable only the extra question (and you can hide the answer part)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: holch, Kaikelan_190010
The topic has been locked.
  • Kaikelan_190010
  • Kaikelan_190010's Avatar Topic Author
  • Offline
  • Banned
  • Banned
More
4 years 10 months ago #184602 by Kaikelan_190010
Replied by Kaikelan_190010 on topic Submitting answer after time-limit
Thanks! That's such a simple solution, I'm wondering how I even got confused by this in the first place.

If one wants to use Javascript for this kind of problem, I found this to be very helpful.
The topic has been locked.
More
4 years 9 months ago #185205 by surveySn
Replied by surveySn on topic Submitting answer after time-limit
<div> next button <span id="timer1">20s <span> enable </span></span> <script>
window.onload = function(){
var sec = 19;
// Delay time - need to be modified - 1
setInterval(function(){

document.getElementById("timer1").innerHTML = "wait" +sec +" s.";
sec--;
if(sec < 0){
document.getElementById("timer1").innerHTML = 'Enabled。';
}
},1000);
}
</script> <script type="text/javascript" charset="utf-8">

// Delay time
var delayTime = 20;

$(document).on('ready pjax:scriptcomplete',function(){
$('#ls-button-submit').prop('disabled', true);
setTimeout(function() {
$('#ls-button-submit').prop('disabled', false);
}, delayTime*1000);
});
</script></div>
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose