Timed survey Submit

Plus d'informations
il y a 3 mois 1 semaine #176545 par chukoo
COM_KUNENA_MESSAGE_CREATED_NEW
Hello

I'm trying to accomplish the timed survey and to auto submit the survey at the end of timer.

Thanks to the community I got so far up until the timer shows up on the page. Using the " www.limesurvey.org/forum/can-i-do-this-w...6-time-based-surveys "

I used below counter on my page:
<form name="counter">
<div style="width:400px;margin:auto;color:orange;">
span style="valign:middle">Time remaining : </span>
<input type="text" id="surveycounter" size="8" name="d2" class="counter" disabled="disabled">
</div>
</form>

How do I make it to go to submit button, when the time reached 00:00.$('#limesurvey').submit()

thanks

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 3 mois 1 semaine #176554 par jelo
COM_KUNENA_MESSAGE_REPLIED_NEW
You should post the LimeSurvey version you use.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 3 mois 1 semaine #176555 par chukoo
COM_KUNENA_MESSAGE_REPLIED_NEW
Version 3.15.1+181017

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 3 mois 1 semaine #176557 par DenisChenu
COM_KUNENA_MESSAGE_REPLIED_NEW
manual.limesurvey.org/Question_type_-_Short_free_text#Timer and its done …

Else if you want to do your js : deactivate ajax mode it broke $('#limesurvey').submit();

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 2 mois 3 semaines #177481 par chukoo
COM_KUNENA_MESSAGE_REPLIED_NEW
Hello Denis, Thanks for the suggestion.
I have below on my layout_global.twig at the bottom, the timer works, however when the timer reaches 0 it doesn't submit. Could you please tell me where I'm wrong in this? thanks in advance

function display() {
if (seconds <= 0 )
{
seconds = 60;
minutes -= 1;
}
if(minutes <= -1)
{
seconds = 0;
minutes = 0;
}

else
seconds -= 1;
document.getElementById("surveycounter").value = minutes + " : " + seconds;
document.cookie="infinit_minutes=" + minutes;
document.cookie="infinit_sec=" + seconds;
if(seconds == 0 && minutes == 0)
{

}
else {
setTimeout("display()",1000)
}
}
{
if(seconds == 0 && minutes == 0)
document.getElementById('#limesurvey').submit();
}

</script>
<body onload="display()">
<form name="counter">
<div style="width:400px;margin:auto;color:orange;">
<span style="valign:middle">Time remaining : </span>
<input type="text" id="surveycounter" size="8" name="d2" value="1" class="counter" disabled="disabled">
</div>
</form>
</body>
</html>

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 2 mois 3 semaines #177486 par DenisChenu
COM_KUNENA_MESSAGE_REPLIED_NEW
<body onload="display()"> : what the fuck is this body ????

Please : use jquery : api.jquery.com/ready/

And if(seconds <= 0 && minutes <= 0) surely too

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 2 mois 2 semaines #177727 par chukoo
COM_KUNENA_MESSAGE_REPLIED_NEW
Thanks Denis for your Suggestion.
I was able to do this with jquery.

Connexion ou Créer un compte pour participer à la conversation.

Commencez dès maintenant !

Créez simplement un compte et commencez à utiliser LimeSurvey dès aujourd'hui.

Inscrivez-vous maintenant

Inscrivez-vous à notre Newsletter!