random order of answer categories, except for...

Plus d'informations
il y a 7 ans 4 mois #83721 par Schroder101
Ok I realized I also need another tweak

in another question with 13 answers i need to keep the first two answers and the last answer static and also retain the 'other' option at the very end.

I edited the code just by adding another couple of lines see attached which sort of worked however I'm not sure how to make 'other' option show up last.

any suggestions?
Pièces jointes :

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

Plus d'informations
il y a 7 ans 4 mois #83750 par tpartner
Try this to place the "Other" at the end of the list:
$( 'input#answer' + sID + 'X' + gID + 'X' + qID + 'othercbox' ).parent().appendTo($( '#question' + qID + ' td.answer ul' ));

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Les utilisateur(s) suivant ont remercié: Schroder101

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

Plus d'informations
il y a 7 ans 4 mois #83771 par geejay76
All of these tips are proving very helpful - thanks!

I've been unsuccessfully trying to create a randomisation for a list of 10 attributes with option 10 being a "none of the above" option. In addition to these 10 attributes I also want to include an other option.

I am trying to set up the order of the list so that the first 9 attributes are randomised, then the Other option is displayed, then None at the bottom.

At the moment I can get the randomisation working, but I can;t seem to get the None to lock at the bottom.

Any help would be much appreciated.

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

Plus d'informations
il y a 7 ans 4 mois #83772 par Schroder101
Ok that worked thanks!

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

Plus d'informations
il y a 7 ans 4 mois #83773 par Schroder101
Just replace this line in the code posted above - replacing the bit were it calls the first answer only and make sure the other option is activated should work

// Place answer no 10 last below 'other'
$('input#answer' + sID + 'X' + gID + 'X' + qID + 10 + '' ).parent().appendTo($( '#question' + qID + ' td.answer ul' ));

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

Plus d'informations
il y a 7 ans 2 mois #86690 par arielmosto
Dear Tony:

I need the same for the Ranking question type.

Is that possible?
I tried this same code, but does not work.

Thank you very much ! Regards ! Ariel

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

Plus d'informations
il y a 7 ans 2 mois #86691 par tpartner
Ariel, this thread is getting a little convoluted. Do you want to randomize all choices except except the last one or all except the first one.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

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

Plus d'informations
il y a 7 ans 2 mois #86692 par arielmosto
Dear Tony, thanks.

I need to randomize all choices except the last one.

Regards !

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

Plus d'informations
il y a 7 ans 2 mois #86697 par tpartner
I think the easiest way to achieve that would be to...

1) Append the answer code of the last item with "_l"


2) In the ranking question, set "Random answer order" to "Yes"


3) Add the following script to the source of the ranking question. Replace "QQ" with the ranking question ID .
<script type="text/javascript" charset="utf-8">
 
	$(document).ready(function() {
 
		var qID = QQ;
 
		$('#question'+qID+' .rank.label select').append($('#question'+qID+' .rank.label option[value$="_l"]'));
	});
 
</script>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Pièces jointes :

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!