Hi,
I want to design something like this on lime survey:
Please comment against following water sources:
Distilled water(text display)
D1(text box)
D2 (text box)
D3(text box)
Purified water
P1 (text box)
P2(text box)
P3 (text box)
To my understanding I make Q1 an array(text) and then Q2 and Q3 a boilerplate, I hide both of these and append them in the array on their respective places. I am stuck with code, please help me on this. Need to deliver this tomorrow.
Found this code while desk research-ing
1 <script type="text/javascript" charset="utf-8">
$(document).ready(function() {
// Identify the questions
var q1 = $('#question'+{QIA}+'');
var q2 = $(q1).nextAll('.text display:eq(0)');
// Hide the text display question
$(q2).hide();
// Move the hidden text display input into the array
$('th.answertext:'first', q1).append($('input[type="text display"]', q2));
// Some styling...
$('input[type="text"]', q1).css({
'width': '50%'
});
});
</script>
I am trying to make q2 a text display instead of a text box and replacing word "text" with "text display" in the code everywhere. Since I want this boilerplate to sit after Row1 so i'm replacing "('th.answertext:first', q1) with "('th.answertext:row1', q1)". I have tweaked the code thousand time to no avail. Please someone help me on this.
Q1 : text display : " Please comment against following water sources:"
Q2 : Multi short text "Distilled water" / + Sub question
Q3 : Multi short text "Purified water" / + Sub question
And it's OK, no ?
Surely something i don't understand , because i don't see any difficulty here.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. -
Professional support
-
Plugins, theme and development
. I don't answer to private message.
Last edit: 8 years 8 months ago by DenisChenu. Reason: Add the question text to Q2 and Q3