Automatically proceed to next question after selecting answer

Plus d'informations
il y a 3 mois 4 semaines #171522 par Joffm
Joffm a répondu au sujet : Automatically proceed to next question after selecting answer
Hi, siam,

it is a Javascript snippet.

So you should put it into an Javascript file, here I should say, the "custom.js" of your template is the right place.

Best regards
Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Les utilisateur(s) suivant ont remercié: Siem

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

Plus d'informations
il y a 3 mois 4 semaines #171523 par Siem
Siem a répondu au sujet : Automatically proceed to next question after selecting answer
Thanks Joff, I put it in the Javascript file, but then I get this error:

Error: Syntax error, unrecognized expression: #question{QID} input[type="radio"]

I tried it with and without the <script> tags:
$(document).ready(function(){ 
	$('#question{QID} input[type="radio"]').on('click', function() {
		$('#ls-button-submit').trigger('click');
	});
});

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

Plus d'informations
il y a 3 mois 4 semaines #171524 par Joffm
Joffm a répondu au sujet : Automatically proceed to next question after selecting answer
Hi,

I put it into the question text (source code mode) and it works.

Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Les utilisateur(s) suivant ont remercié: Siem

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

Plus d'informations
il y a 3 mois 4 semaines - il y a 3 mois 4 semaines #171526 par Siem
Siem a répondu au sujet : Automatically proceed to next question after selecting answer

Joffm écrit: Hi,

I put it into the question text (source code mode) and it works.

Joffm


You are right, that was the trick many thanks! :)

I would like to add this code to my theme so it is automatically added to the questions, would this be possible?
It would save a lot of time, since there are multiple tests that need it.
Dernière édition: il y a 3 mois 4 semaines par Siem.

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

Plus d'informations
il y a 3 mois 4 semaines #171538 par tpartner
tpartner a répondu au sujet : Automatically proceed to next question after selecting answer
If want it to act on EVERY list-radio question in every survey using that template, add this to your theme custom.js file:

$(document).on('ready pjax:scriptcomplete',function(){ 
	$('.list-radio input[type="radio"]').on('click', function() {
		$('#ls-button-submit').trigger('click');
	});
});

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Les utilisateur(s) suivant ont remercié: Siem

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

Plus d'informations
il y a 1 mois 3 jours #175426 par surveySn
surveySn a répondu au sujet : Automatically proceed to next question after selecting answer
Hello tpartner


I have some question,

Can this be used in Arrays?


This will hide all navigation buttons:

<script type="text/javascript" charset="utf-8">
$(document).on('ready pjax:scriptcomplete',function(){
$('#navigator-container button').hide();
});
</script>

But this code hides all next, can you hide only one problem page's next?

We look forward to your reply! Thank you.

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

Plus d'informations
il y a 1 mois 2 jours #175438 par tpartner
tpartner a répondu au sujet : Automatically proceed to next question after selecting answer

Can this be used in Arrays?

Can what be used? There are many script samples in this thread.

But this code hides all next, can you hide only one problem page's next?

Please explain exactly what you want to do and what you have tried.

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 semaines 6 jours #175649 par surveySn
surveySn a répondu au sujet : Automatically proceed to next question after selecting answer


Can this type be used?
Pièces jointes :

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

Plus d'informations
il y a 3 semaines 6 jours #175650 par tpartner
tpartner a répondu au sujet : Automatically proceed to next question after selecting answer
That does not answer my questions.

What exactly are you trying to do?

What LimeSurvey version are you using?

What have you tried?

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!