Version: 3.17.3 How to Bold current question or add a check mark when answered

Plus d'informations
il y a 3 mois 1 semaine #184228 par EPSRCAC1
I have researched this and found options for the older versions, but can't seem to find one that addresses this same need in version 3.17.3.

Any idea, code, what have you on creating a way to show what is responded to or not - it can be colors or checkmarks. Just need help with the actual code and where to place it in V 3.17.3.

Thanks,

E

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

LimeSurvey Partners
Plus d'informations
il y a 3 mois 1 semaine #184230 par holch
But if it is answered it is answered. Isn't that already an indicator?

Could you give some more information? Maybe how you would like it to look like?

What question type do you want this for?

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

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

Plus d'informations
il y a 3 mois 1 semaine #184231 par EPSRCAC1
This is what I am looking for, but for version 3. The instructions for this post are pre-version 3: www.limesurvey.org/forum/design-issues/9...k-mark-when-answered

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

Plus d'informations
il y a 3 mois 1 semaine #184232 par holch
I guess you will have to wait until Tpartner shows up and adapts his script for 3.0

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

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

Plus d'informations
il y a 3 mois 1 semaine #184233 par EPSRCAC1
So no one has a solution for this?

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

Plus d'informations
il y a 3 mois 1 semaine #184235 par holch

So no one has a solution for this?

How should I know that???
You've posted your question 3,5h ago on a Friday afternoon. I guess you will have to wait a little longer to draw such a conclusion.

But your best chance is that Tpartner adapts his original script to 3.x, if not already done. So you just need to wait. Tpartner will quite probably show up at one point.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

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

Plus d'informations
il y a 3 mois 1 semaine #184242 par tpartner
Can you attach a sample survey containing all of those question types?

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 3 mois 1 semaine #184253 par EPSRCAC1
As requested.

Fichier attaché :

Nom du fichier : surveys_archive1.zip
Taille du ficher :9 ko
Pièces jointes :

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

Plus d'informations
il y a 3 mois 6 jours #184272 par tpartner
Sorry, I don't have time to go through your working survey.

What I meant was to attach a sample survey containing only the question types listed in the post that you linked to.

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 3 mois 6 jours - il y a 3 mois 6 jours #184275 par EPSRCAC1
Sorry for the misunderstanding. The link is as follows:




This survey only uses:
  • Short free text
  • Yes/No
  • List (radio)
Dernière édition: il y a 3 mois 6 jours par EPSRCAC1. Raison: update

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

Plus d'informations
il y a 3 mois 6 jours #184276 par holch
He does not want a link but a LSS file, with only the question types that are important.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds
Les utilisateur(s) suivant ont remercié: EPSRCAC1

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

Plus d'informations
il y a 3 mois 6 jours - il y a 3 mois 6 jours #184277 par EPSRCAC1
As requested

Fichier attaché :

Nom du fichier : surveys_archive2.zip
Taille du ficher :5 ko
Pièces jointes :
Dernière édition: il y a 3 mois 6 jours par EPSRCAC1.

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

Plus d'informations
il y a 3 mois 4 jours #184434 par epauldc29
Attached is the LSS file

Fichier attaché :

Nom du fichier : limesurvey...6835.lss
Taille du ficher :26 ko
Pièces jointes :

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

Plus d'informations
il y a 3 mois 4 jours - il y a 3 mois 4 jours #184458 par tpartner
Place this in your custom.js file to assign a class "answered" to those types of questions when answered:

$(document).on('ready pjax:scriptcomplete',function(){
 
	// Initial "answered" states
	$('div[id^="question"]').addClass('unanswered');
	$('div[id^="question"] tr[id^="javatbd"]').addClass('unanswered');
	$('input:radio:checked, input:checkbox:checked, select[id^="answer"][value!=""], input:text[value!=""], textarea[value!=""]').each(function(i) {
		handleAnswers(this);
	});		
 
	// Listeners on the answers
	$('input:radio, input:checkbox, select[id^="answer"]').on('change', function(){
		 handleAnswers(this);
	});
	$('input:radio').on('click', function(){
		 handleAnswers(this);
	});
	$('input:text, textarea').on('keyup change', function(){
		 handleAnswers(this);
	});	
	$('.array-flexible-row tr[id^="javatbd"] td').click(function(){
		 handleAnswers($('input:radio', this));
	});
});
 
// A function to test for answered questions
function handleAnswers(input) {
	var parentQuestion = $(input).closest('div[id^="question"]');
	var parentRow = $(input).closest('tr[id^="javatbd"]');
 
	// Radio lists (anything checked)
	if($(parentQuestion).hasClass('list-radio') || $(parentQuestion).hasClass('yes-no') || $(parentQuestion).hasClass('gender') || $(parentQuestion).hasClass('choice-5-pt-radio') || $(parentQuestion).hasClass('list-with-comment')) {
		markAnswered(parentQuestion);
	}
	// Dropdown lists (anything selected)
	else if($(parentQuestion).hasClass('list-dropdown')) {
		if($(input).val() != '') {
			markAnswered(parentQuestion);
		}
		else {
			markUnanswered(parentQuestion);
		}
	}
	// Short-text, long-text, huge-text and numeric (any value in the input)
	else if($(parentQuestion).hasClass('text-short') || $(parentQuestion).hasClass('text-long') || $(parentQuestion).hasClass('text-huge') || $(parentQuestion).hasClass('numeric')) {
		if($(input).val() != '') {
			markAnswered(parentQuestion);
		}
		else {
			markUnanswered(parentQuestion);
		}
	}
	// Multi-short-text (all inputs must have a value)
	else if($(parentQuestion).hasClass('multiple-short-txt')) {
		if($('input:text[value!=""]', parentQuestion).length == $('input:text', parentQuestion).length) {
			markAnswered(parentQuestion);
		}
		else {
			markUnanswered(parentQuestion);
		}
	}
	// Array (all rows must have a checked radio)
	else if($(parentQuestion).hasClass('array-flexible-row')) {
		if($('input:radio:checked', parentQuestion).length == $('tr[id^="javatbd"]', parentQuestion).length) {
			markAnswered(parentQuestion);
		}
		else {
			markUnanswered(parentQuestion);
		}
		markAnswered(parentRow);
	}
	// Array-numbers (all dropdowns must have a value)
	else if($('.multiflexiselect', parentQuestion).length != 0) {
		if($('.multiflexiselect[value!=""]', parentQuestion).length == $('.multiflexiselect', parentQuestion).length) {
			markAnswered(parentQuestion);
		}
		else {
			markUnanswered(parentQuestion);
		}
		if($('.multiflexiselect[value!=""]', parentRow).length == $('.multiflexiselect', parentRow).length) {
			markAnswered(parentRow);
		}
		else {
			markUnanswered(parentRow);
		}
	}
	// Multiple options (at least one option checked)
	else if($(parentQuestion).hasClass('multiple-opt')) {
		if($('input:checkbox:checked', parentQuestion).length != 0) {
			markAnswered(parentQuestion);
		}
		else {
			markUnanswered(parentQuestion);
		}
	}
}
 
// Assign classes to "answered" questions
function markAnswered(el) {
	$(el).removeClass('unanswered').addClass('answered');
}
function markUnanswered(el) {
	$(el).removeClass('answered').addClass('unanswered');
}

Then, you can use a rule something like this in custom.css:

.question-container.answered {
	background: green;
}

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Dernière édition: il y a 3 mois 4 jours par tpartner.

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!