Multiple question types in array modifiy

Mehr
5 Jahre 1 Monat her #86472 von mjr244
mjr244 antwortete auf das Thema: Multiple question types in array modifiy
:) :) :) tpartner saves the day!!! Thank you so much! (Donating now!)

Bitte Anmelden um an der Konversation teilzunehmen.

Mehr
5 Jahre 1 Monat her #86572 von Mazi
Mazi antwortete auf das Thema: Multiple question types in array modifiy

mjr244 schrieb: :) :) :) tpartner saves the day!!! Thank you so much! (Donating now!)

Thanks for supporting Limesurvey by a donation!


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'"

Bitte Anmelden um an der Konversation teilzunehmen.

Mehr
5 Jahre 3 Wochen her #87651 von zunch2000
zunch2000 antwortete auf das Thema: Multiple question types in array modifiy
Hi All,

Since i didn't succeed i was wondering if someone could help me adjusting the code for the multiple question types in array which was planned for the default template, to fit the "Limespired" template?

Thanks in advance,

Bitte Anmelden um an der Konversation teilzunehmen.

Mehr
4 Jahre 9 Monate her #92087 von boyesae0
boyesae0 antwortete auf das Thema: Multiple question types in array modifiy
I used your workaround to create an array where each row contains two dropdown list questions, the first a brand list and the second a product list. Each row is the same, allowing users to define multiple products from the same lists. In every row, I get an extra empty dropdown list below the product dropdown, as shown in the attached PNG. I'm using Chrome if that matters.

I also have another JS located in template.js that filters the second list (products) by the answer of the first (brand). I got that workaround here . It's possible that the problem is actually in that code, but I can't find it. Maybe they are conflicting with each other somehow? Any thoughts?





Anhang:

Bitte Anmelden um an der Konversation teilzunehmen.

Mehr
4 Jahre 9 Monate her - 4 Jahre 9 Monate her #92088 von boyesae0
boyesae0 antwortete auf das Thema: Multiple question types in array modifiy
Sorry, I meant to also include the .lss file instead of two images.

Dateianhang:

Dateiname: limesurvey...4755.lss
Dateigröße:201 KB
Anhang:
Letzte Änderung: 4 Jahre 9 Monate her von boyesae0.

Bitte Anmelden um an der Konversation teilzunehmen.

Mehr
4 Jahre 7 Monate her #94449 von arpsh
arpsh antwortete auf das Thema: Multiple question types in array modifiy

zunch2000 schrieb: Since i didn't succeed i was wondering if someone could help me adjusting the code for the multiple question types in array which was planned for the default template, to fit the "Limespired" template?


I've had exactly the same problem with the limespired template in getting this workaround to operate - all it ever does is hide the subsequent questions! I have a bank of six short text questions (for people to write in their age) which I want to put next to bank of 6 male/female radio buttons, and I simply can't make it do it!

If you, or anyone else, has had any joy in working this out I would be very interested to know how you did it! ;)

Adam

Bitte Anmelden um an der Konversation teilzunehmen.

Mehr
4 Jahre 7 Monate her #94464 von tpartner
tpartner antwortete auf das Thema: Multiple question types in array modifiy
Can you attach a sample survey?

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Bitte Anmelden um an der Konversation teilzunehmen.

Mehr
4 Jahre 7 Monate her #94470 von arpsh
arpsh antwortete auf das Thema: Multiple question types in array modifiy

tpartner schrieb: Can you attach a sample survey?


I would be delighted to ;)


Dateianhang:

Dateiname: Limespired...rray.lss
Dateigröße:21 KB


I think it should be be pretty simple stuff, but I've never got the workarounds to work in Limespired, and my usual method of tinkering with CSS/javascript (i.e. google plus educated guesswork at the expense of any other skills!) has failed me!

Muchas gracias for any help you can give!
Anhang:

Bitte Anmelden um an der Konversation teilzunehmen.

Mehr
4 Jahre 7 Monate her #94472 von tpartner
tpartner antwortete auf das Thema: Multiple question types in array modifiy
Ah, I see. The "Multiple question types in array" workaround won't work for you because it's designed for individual questions, not array type or multiple-text type questions.

In your case I think it would be easiest to simply create a new column in your array and insert the "Age" text inputs into it.

Here's your survey back with the array question placed before the multiple-text question. The source of the array question contains the script below which:
- Automatically detects the two question elements
- Hides the multiple-text question
- Removes any column width styles imposed by LS on the array
- Inserts a new column in the array
- Inserts a new "Age" header in the array
- Moves the text inputs into the appropriate rows of the array

<script type="text/javascript" charset="utf-8">
	$(document).ready(function() { 
 
		var newHeader = 'Age';
 
		// Identify the questions
		var q1ID = '{QID}';
		var q1 = $('#question'+q1ID+'');
		var q2 = $(q1).nextAll('.multiple-short-txt:eq(0)');
		var q2ID = $(q2).attr('id').split('question')[1];
 
		// Hide the second question
		$(q2).hide();
 
		// Clean up the array widths imposed by LS
		$('.subquestions-list col', q1).css({ 'width':'auto' });
 
		// Insert a new header in the array
		$('.subquestions-list thead td', q1).after('<th>'+newHeader+'</th>');
 
		// Move the age inputs into the array
		$('.answers-list', q1).each(function(i) {
			$('.answertext', this).after('<td class="answer_cell_000"></td>');
		});
		$('input[type="text"]', q2).each(function(i) {
			$('.answer_cell_000:eq('+i+')', q1).append($(this));
		});
 
		// Some styles for the array (this could be done in template.css)
		$('.subquestions-list th, .subquestions-list td', q1).css({ 'padding':'3px 7px' });
	});
</script>


Dateianhang:

Dateiname: Limespired...puts.lss
Dateigröße:22 KB




Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Anhang:
Folgende Benutzer bedankten sich: arpsh

Bitte Anmelden um an der Konversation teilzunehmen.

  • lsorg
  • lsorgs Avatar
  • Besucher
  • Besucher
4 Jahre 3 Monate her #98523 von lsorg
lsorg antwortete auf das Thema: Multiple question types in array modifiy
Hey,

I have successfully insert the workaround in my survey. Thank you very much for the very good workaround in the manual it is very simple and useful.

But one thing I have not find in the code. All Words in the first column are written in bold. How can I format the font in the first column?
In the workaround Demo it is the column where stands A), B), C).

Thanks for your help.

Best regards,
lsorg

Bitte Anmelden um an der Konversation teilzunehmen.

Mehr
4 Jahre 3 Monate her #98524 von tpartner
tpartner antwortete auf das Thema: Multiple question types in array modifiy
Can you activate a test survey for me to see?

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Bitte Anmelden um an der Konversation teilzunehmen.

  • lsorg
  • lsorgs Avatar
  • Besucher
  • Besucher
4 Jahre 3 Monate her #98528 von lsorg
lsorg antwortete auf das Thema: Multiple question types in array modifiy
Hello tpartner

here is the test link: Link

Thanks for your efforts.

Bitte Anmelden um an der Konversation teilzunehmen.

Mehr
4 Jahre 3 Monate her #98529 von tpartner
tpartner antwortete auf das Thema: Multiple question types in array modifiy
Add this to the end of template.css:
.inlineRow td.questiontext {
	font-weight: normal;
}
 
#inlineWrapper0 td.questiontext {
	font-weight: bold;
}

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Bitte Anmelden um an der Konversation teilzunehmen.

  • lsorg
  • lsorgs Avatar
  • Besucher
  • Besucher
4 Jahre 3 Monate her - 4 Jahre 3 Monate her #98553 von lsorg
lsorg antwortete auf das Thema: Multiple question types in array modifiy
Amazing. Thank you very much. It works perfectly now.

Thanks for your help.

Best regards
lsorg


P.S. Now it is time for me to spend some money for this great project. :)
Letzte Änderung: 4 Jahre 3 Monate her von lsorg.

Bitte Anmelden um an der Konversation teilzunehmen.

Mehr
4 Jahre 2 Monate her #99427 von arpsh
arpsh antwortete auf das Thema: Multiple question types in array modifiy

tpartner schrieb: Ah, I see. The "Multiple question types in array" workaround won't work for you because it's designed for individual questions, not array type or multiple-text type questions.

In your case I think it would be easiest to simply create a new column in your array and insert the "Age" text inputs into it.

Here's your survey back with the array question placed before the multiple-text question. The source of the array question contains the script below


A much belated thank you to tpartner for his gracious help getting an alternate workaround for this scenario, which seems to be working perfectly. Your assistance is greatly appreciated, even if it took me a few months to realise I hadn't actually posted a response .... :blush:

Bitte Anmelden um an der Konversation teilzunehmen.

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