Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: Multiple question types in array modifiy

Re: Multiple question types in array modifiy 7 Monate 2 Wochen her #103235

  • Mazi
  • Mazis Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 5324
  • Dank erhalten: 294
  • Karma: 248
"Not working" is not a very helpful error description. Please always post a link to an activated demo survey so we can have a look at the HTML source code.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Re: Multiple question types in array modifiy 7 Monate 2 Wochen her #103237

  • MikeConom
  • MikeConoms Avatar
  • OFFLINE
  • Junior Lime
  • Beiträge: 39
  • Dank erhalten: 1
  • Karma: 0
Mazi

yes it was mistake becuse i didnt give more informations about this.
Now i am not working with the side by side
when i test it again i'll sent more informations

Thanks and happy new year
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Re: Multiple question types in array modifiy 5 Monate 5 Tage her #106599

  • quadrellis
  • quadrelliss Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 8
  • Karma: 0
Hi Tpartner et al,

Thanks for your code that allows the addition of a textbox adjacent to a yes no array.

Is it possible to put the text input box in the last column ther the two Yes/No array columns ?

Cheers,

Scott
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Re: Multiple question types in array modifiy 3 Monate 3 Wochen her #108198

  • Erwinx2
  • Erwinx2s Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 10
  • Karma: 0
psl-questionsa.png



Hello,

I have made some JavaScript modifications. It allows to merge elements of two questions into one question. If you can read JavaScript you can easily adapt it. The code should be resist in template.js of your LimeSurvey-template:

 function pslSurvey(idStr,idStr1) 
{
	var $removed = $('#'+idStr).children().eq(0).remove();
	var $content = $('#'+idStr).html();
	$('#'+idStr1).append($content);
	return;
}
 
$(document).ready(function(){
	//return;
	var $myTr    = $('#javatbd969997X11X168SQ001');
	if ( $myTr.length){
		pslSurvey('javatbd969997X11X184SQ001','javatbd969997X11X168SQ001');
		$('#javatbd969997X11X168SQ001').parents().eq(1).children().eq(1).children().eq(0).append('<th class=\"answertext\">männlich</th>');
		$('#javatbd969997X11X168SQ001').parents().eq(1).children().eq(1).children().eq(0).append('<th class=\"answertext\">weiblich</th>');
		pslSurvey('javatbd969997X11X184SQ002','javatbd969997X11X168SQ002');
		pslSurvey('javatbd969997X11X184SQ003','javatbd969997X11X168SQ003');
		pslSurvey('javatbd969997X11X184SQ004','javatbd969997X11X168SQ004');
		pslSurvey('javatbd969997X11X184SQ005','javatbd969997X11X168SQ005');
		pslSurvey('javatbd969997X11X184SQ006','javatbd969997X11X168SQ006');
		$('#question184').empty();
	}
    //console.log($debug);
});


What it does:

  • remove unnecessary column
  • grab content from the second question
  • put content to the first question
  • extentend labels/column header of the first question
  • remove the second question


  • psl-questions1a.png




    PS: If you can't read JavaScript, I might help... NO ADVERTISING!
    Letzte Änderung: 3 Monate 3 Wochen her von tpartner.
    Der Administrator hat öffentliche Schreibrechte deaktiviert.
    Moderatoren: ITEd
    Ladezeit der Seite: 0.216 Sekunden
    Donation Image