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

Más
2 meses 1 semana antes #184228 por 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

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

LimeSurvey Partners
Más
2 meses 1 semana antes #184230 por 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

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
2 meses 1 semana antes #184231 por 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

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
2 meses 1 semana antes #184232 por 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

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
2 meses 1 semana antes #184233 por EPSRCAC1
So no one has a solution for this?

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
2 meses 1 semana antes #184235 por 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

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
2 meses 1 semana antes #184242 por 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

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
2 meses 1 semana antes #184253 por EPSRCAC1
As requested.

Archivo Adjunto:

Nombre del Archivo: surveys_archive1.zip
Tamaño del Archivo:9 KB
Adjuntos:

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
2 meses 1 semana antes #184272 por 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

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
2 meses 1 semana antes - 2 meses 1 semana antes #184275 por EPSRCAC1
Sorry for the misunderstanding. The link is as follows:




This survey only uses:
  • Short free text
  • Yes/No
  • List (radio)
Última Edición: 2 meses 1 semana antes por EPSRCAC1. Razón: update

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
2 meses 1 semana antes #184276 por 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
El siguiente usuario dijo gracias: EPSRCAC1

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
2 meses 1 semana antes - 2 meses 1 semana antes #184277 por EPSRCAC1
As requested

Archivo Adjunto:

Nombre del Archivo: surveys_archive2.zip
Tamaño del Archivo:5 KB
Adjuntos:
Última Edición: 2 meses 1 semana antes por EPSRCAC1.

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
2 meses 5 días antes #184434 por epauldc29
Attached is the LSS file

Archivo Adjunto:

Nombre del Archivo: limesurvey...6835.lss
Tamaño del Archivo:26 KB
Adjuntos:

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
2 meses 5 días antes - 2 meses 5 días antes #184458 por 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
Última Edición: 2 meses 5 días antes por tpartner.

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

¡Comenzar ahora!

Simplemente cree una cuenta y comience a usar LimeSurvey hoy mismo.

Registrarse ahora
¡Únase a nuestro boletín informativo!

Iniciar sesión