"Exclusive option" in array

Mehr
3 Jahre 11 Monate her #130390 von delarammahdaviii
hi
thanks for
i want use "Exclusive option" in array but for answer code , not for subquestion code
how can do it ?

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

LimeSurvey Partners
Mehr
3 Jahre 11 Monate her #130395 von tpartner
Sorry, I don't understand the question. In an array, the answer options are already exclusive because they're radios.

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 der Konversation beizutreten.

Mehr
3 Jahre 11 Monate her - 3 Jahre 11 Monate her #130397 von delarammahdaviii
In an array (single choice per rows); i want choice answer in column , if one of the answer in D column is choose , another rows can't choose the answer D column .
Anhänge:
Letzte Änderung: 3 Jahre 11 Monate her von delarammahdaviii.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
3 Jahre 11 Monate her #130399 von tpartner
Just for column D, or for all columns?

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 der Konversation beizutreten.

Mehr
3 Jahre 11 Monate her #130400 von delarammahdaviii
Just for column D

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
3 Jahre 11 Monate her - 3 Jahre 11 Monate her #130407 von tpartner
In that case, adding this script to the question source should do the trick:

<script type="text/javascript" charset="utf-8">		
	$(document).ready(function() {	
 
		// Identify this question
		var thisQuestion = $('#question{QID}');
 
		// Assign column-specific classes
		$('table.subquestions-list tr', thisQuestion).each(function(i){
			$('> *', this).each(function(i){
				$(this).addClass('column-'+i+'');
				$(this).attr('data-column', i);
			});
		});
 
		// Define the column to have exclusive answers
		var exclusiveColumn = 4;
 
		// Listeners on the radios
		$('input.radio', thisQuestion).on('click', function(e) {
			var thisCell = $(this).closest('td');
			if($(thisCell).hasClass('column-'+exclusiveColumn)) {
				setTimeout(function () {
					$('.column-'+exclusiveColumn+' input.radio:not(:checked)', thisQuestion).prop('disabled', true);
				}, 100);
			}
			if($('.column-'+exclusiveColumn+' input.radio:checked', thisQuestion).length == 0) {
				$('.column-'+exclusiveColumn+' input.radio', thisQuestion).prop('disabled', false);
			}
		});
 
		// Initial radio state
		if($('.column-'+exclusiveColumn+' input.radio:checked', thisQuestion).length != 0) {
			$('.column-'+exclusiveColumn+' input.radio:not(:checked)', thisQuestion).prop('disabled', true);
		}
    });
</script>

Sample survey attached.

Dateianhang:

Dateiname: limesurvey...47-2.lss
Dateigröße:21 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Anhänge:
Letzte Änderung: 3 Jahre 11 Monate her von tpartner.
Folgende Benutzer bedankten sich: delarammahdaviii

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
3 Jahre 11 Monate her - 3 Jahre 11 Monate her #130445 von DenisChenu
ANd with EM (for PHP validation too (user deactivated javascript)

Question validation equation
countif("d",self.NAOK) <= 1

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
An error happen ? Before make a new topic : remind the Debug mode .
Letzte Änderung: 3 Jahre 11 Monate her von DenisChenu.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
3 Jahre 11 Monate her - 3 Jahre 11 Monate her #130462 von tpartner
Yeah but I think the user experience with disabled radios is better. :)

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Letzte Änderung: 3 Jahre 11 Monate her von tpartner.
Folgende Benutzer bedankten sich: delarammahdaviii

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
3 Jahre 11 Monate her #130469 von Mazi

DenisChenu schrieb: ANd with EM (for PHP validation too (user deactivated javascript)

Question validation equation

countif("d",self.NAOK) <= 1

Denis, is that a custom validation for making sure that at the whole question option "d" is used only once?

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com
Want to use your survey offline -> www.offlinesurveys.com

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
3 Jahre 11 Monate her #130500 von DenisChenu

Mazi schrieb: ....
Denis, is that a custom validation for making sure that at the whole question option "d" is used only once?

Yes

tpartner schrieb: Yeah but I think the user experience with disabled radios is better. :)

Sure, but : need a PHP control :). Else a user can decativate JS (or js can be broken for some reason ;) ) and false value in DB.

I try always to
- Add specific desired behaviour in EM first
- Add some js for user experience
:)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
An error happen ? Before make a new topic : remind the Debug mode .

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
3 Jahre 11 Monate her #130506 von tpartner
Well, with JavaScript disabled LimeSurvey is almost useless anyway - there is no dynamic filtering or EM.

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 der Konversation beizutreten.

Mehr
3 Jahre 11 Monate her - 3 Jahre 11 Monate her #130530 von delarammahdaviii
hi
tnx all for reply:) :) :)


i so sorry this case is change
if one of the D column is select ; C and B else disable .user only can select from A or E
Anhänge:
Letzte Änderung: 3 Jahre 11 Monate her von delarammahdaviii.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
5 Monate 1 Tag her #187895 von EnricoCaruso
The script and sample survey currently do not work with LimeSurvey version 3.17.9. I can not find what's going on. Maybe there is a version conflict here.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
5 Monate 1 Tag her - 5 Monate 1 Tag her #187902 von Joffm

Maybe there is a version conflict here.

Yes, this is very probable.
This thread ended three and a half years ago and the screenshot shows a template of version 2.05 / 2.06 (I think)

So please add your sample survey as *.lss, explain what you want to do, and we will try to find a solution.

Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Anhänge:
Letzte Änderung: 5 Monate 1 Tag her von Joffm.
Folgende Benutzer bedankten sich: EnricoCaruso

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
5 Monate 16 Stunden her #187934 von EnricoCaruso
A rating of individual statements is required, with simultaneous distribution of the ranking (exclusive answer per column, except last column). The script from tpartner tpartner on topic Need a replacement for Ranking Questionhere

Dateianhang:

Dateiname: limesurvey...5517.lss
Dateigröße:31 KB
goes in the right direction, only it works for all columns. I can not get an exception for the last column. The solution in this forum where the individual Exclusive columns can be specified is good, but it does not work.
Anhänge:

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

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