How do I hide or disable answer options after a certain time?

Plus d'informations
il y a 3 mois 3 semaines #169444 par Danke
Danke a créé le sujet : How do I hide or disable answer options after a certain time?
Hello Limesurvey-Team,


I want to hide (or disable) radio buttons 10 seconds after the question is loaded.

I used the following skript in a former study (it worked fine; now I am using Version 2.71.1+170927 ):


</script><script type = "text/javascript" charset = "utf-8">

$(document).ready(function() {

setTimeout(function() {

$('#answer828677X2577X12206SQ003').attr("hidden", true);

}, 11000);

});


</script>


It seems that the "hidden"-command isn't working any more. The problem with the "disabled"-command (which is working) is that the answers aren't stored.

Does anyone have an idea what I could try? That would be great! Thank you very much in advance.

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

Plus d'informations
il y a 3 mois 2 semaines #169596 par Danke
Danke a répondu au sujet : How do I hide or disable answer options after a certain time?
Leeeeemoooons? Aaaaaare youuuuuuu theeeere?

I am grateful for every hint!!

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

Plus d'informations
il y a 3 mois 2 semaines #169629 par tpartner
tpartner a répondu au sujet : How do I hide or disable answer options after a certain time?
This is a little more complicated than it seems. What happens if someone has already selected that radio?

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

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

Plus d'informations
il y a 3 mois 2 semaines #169638 par Danke
Danke a répondu au sujet : How do I hide or disable answer options after a certain time?
Thank you, for your reply tpartner!

If I use the "disabled"-command - the command works: the buttons are disabled after a time criterion, and it looks as if the answers would be "locked" (Picture 1) - but they are not stored (there are no entries in the data file). I actually had this problem before in an older limesurvey-version - and then used the "hidden"-command, which isn't working anymore (the radios are not hidden)...
Pièces jointes :

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

Plus d'informations
il y a 3 mois 2 semaines #169639 par tpartner
tpartner a répondu au sujet : How do I hide or disable answer options after a certain time?
You haven't answered my question. What do you want to do if a radio has already been selected?

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

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

Plus d'informations
il y a 3 mois 2 semaines #169641 par Danke
Danke a répondu au sujet : How do I hide or disable answer options after a certain time?
Hmm... I am not quite sure if I understand your question.

I want the question to work like a "classic" multiple selection question - with a time criterion (no changes should be possible after 10 s). So, If a radio has been selected - this should be stored as an answer (or one of the multiple answers).

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

Plus d'informations
il y a 3 mois 1 semaine #169708 par tpartner
tpartner a répondu au sujet : How do I hide or disable answer options after a certain time?
I'm confused. You say "multiple selection question" but radios are for single-choice questions.

Can you attach a small sample survey containing only the pertinent question(s)?

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

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

Plus d'informations
il y a 3 mois 1 semaine #169715 par Danke
Danke a répondu au sujet : How do I hide or disable answer options after a certain time?
Yes - sorry! It is a "multiple selection question"... Thank you very much for your help!
Pièces jointes :

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

Plus d'informations
il y a 3 mois 1 semaine #169717 par tpartner
tpartner a répondu au sujet : How do I hide or disable answer options after a certain time?
Okay, I think the solution is simply to re-enable the check-boxes when the "Next" button is clicked.

<script type="text/javascript" charset="utf-8">
 
	$(document).ready(function() {
 
		setTimeout(function() {
			$('#question{QID} input:checkbox').prop('disabled', true);
		}, 11000);
 
		$('#movenextbtn, #moveprevbtn, #movesubmitbtn').on('click', function(e) {
			$('#question{QID} input:checkbox').prop('disabled', false);
		});
	});
</script>

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

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!