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

Mehr
1 Woche 5 Tage her #184228 von EPSRCAC1
COM_KUNENA_MESSAGE_CREATED_NEW
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

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

LimeSurvey Partners
Mehr
1 Woche 5 Tage her #184230 von holch
COM_KUNENA_MESSAGE_REPLIED_NEW
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

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
1 Woche 5 Tage her #184231 von EPSRCAC1
COM_KUNENA_MESSAGE_REPLIED_NEW
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

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
1 Woche 5 Tage her #184232 von holch
COM_KUNENA_MESSAGE_REPLIED_NEW
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

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
1 Woche 5 Tage her #184233 von EPSRCAC1
COM_KUNENA_MESSAGE_REPLIED_NEW
So no one has a solution for this?

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
1 Woche 5 Tage her #184235 von holch
COM_KUNENA_MESSAGE_REPLIED_NEW

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

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
1 Woche 4 Tage her #184242 von tpartner
COM_KUNENA_MESSAGE_REPLIED_NEW
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

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
1 Woche 3 Tage her #184253 von EPSRCAC1
COM_KUNENA_MESSAGE_REPLIED_NEW
As requested.

Dateianhang:

Dateiname: surveys_archive1.zip
Dateigröße:9 KB
Anhang:

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
1 Woche 2 Tage her #184272 von tpartner
COM_KUNENA_MESSAGE_REPLIED_NEW
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

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
1 Woche 2 Tage her - 1 Woche 2 Tage her #184275 von EPSRCAC1
COM_KUNENA_MESSAGE_REPLIED_NEW
Sorry for the misunderstanding. The link is as follows:




This survey only uses:
  • Short free text
  • Yes/No
  • List (radio)
Last edit: 1 Woche 2 Tage her by EPSRCAC1. Begründung: update

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
1 Woche 2 Tage her #184276 von holch
COM_KUNENA_MESSAGE_REPLIED_NEW
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
Folgende Benutzer bedankten sich: EPSRCAC1

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
1 Woche 2 Tage her - 1 Woche 2 Tage her #184277 von EPSRCAC1
COM_KUNENA_MESSAGE_REPLIED_NEW
As requested

Dateianhang:

Dateiname: surveys_archive2.zip
Dateigröße:5 KB
Anhang:
Last edit: 1 Woche 2 Tage her by EPSRCAC1.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
1 Woche 19 Stunden her #184434 von epauldc29
COM_KUNENA_MESSAGE_REPLIED_NEW
Attached is the LSS file

Dateianhang:

Dateiname: limesurvey...6835.lss
Dateigröße:26 KB
Anhang:

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
1 Woche 16 Stunden her - 1 Woche 16 Stunden her #184458 von tpartner
COM_KUNENA_MESSAGE_REPLIED_NEW
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
Last edit: 1 Woche 16 Stunden her by tpartner.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Jetzt loslegen!

Melden Sie sich jetzt an, und erstellen Sie in wenigen Minuten Ihre erste Umfrage.

Account einrichten

Abonnieren Sie unseren Newsletter

Abonnieren Sie unseren Newsletter für alle Neuigkeiten rund um LimeSurvey
captcha