Welcome, Guest
Username: Password: Remember me

TOPIC: Multiple question types in array modifiy

Re: Multiple question types in array modifiy 6 months 2 weeks ago #103235

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5300
  • Thank you received: 291
  • Karma: 247
"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'"
The administrator has disabled public write access.

Re: Multiple question types in array modifiy 6 months 2 weeks ago #103237

  • MikeConom
  • MikeConom's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 39
  • Thank you received: 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
The administrator has disabled public write access.

Re: Multiple question types in array modifiy 4 months 4 days ago #106599

  • quadrellis
  • quadrellis's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 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
The administrator has disabled public write access.

Re: Multiple question types in array modifiy 2 months 3 weeks ago #108198

  • Erwinx2
  • Erwinx2's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 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!
    Last Edit: 2 months 3 weeks ago by tpartner.
    The administrator has disabled public write access.
    Moderators: ITEd
    Time to create page: 0.187 seconds
    Donation Image