Multiple question types in array modifiy

More
3 years 2 months ago #103235 by Mazi
"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)survey-consulting.com'"

Please Log in to join the conversation.

More
3 years 2 months ago #103237 by MikeConom
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

Please Log in to join the conversation.

More
3 years 4 days ago #106599 by quadrellis
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

Please Log in to join the conversation.

More
2 years 10 months ago - 2 years 10 months ago #108198 by Erwinx2



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
  • [/b]





    PS: If you can't read JavaScript, I might help... NO ADVERTISING!
    Attachments:
    Last Edit: 2 years 10 months ago by tpartner.

    Please Log in to join the conversation.

    More
    2 years 2 months ago #116656 by Mazi
    Erwinx2, which template did you use for your modifications?


    Best regards/Beste Grüße,
    Dr. Marcel Minke
    (Limesurvey Head of Support)
    Need Help? We offer professional Limesurvey support
    Contact: marcel.minke(at)survey-consulting.com'"

    Please Log in to join the conversation.