Multiple choice table - Discrete choice Models

More
2 years 3 weeks ago - 2 years 3 weeks ago #153244 by Rexha
Hello everyone,

I'm a PhD student and my University has LimeSurvey Plataform as tool to perform surveys. However, there is a specific type of questions that i need to insert in the survey, but the default options don't offer me it.

I need a table with six coluns and 23 lines all to be fill up with text, by me. Then a 24 line should have the radio button, that allows the respondent to select one of the 5 coluns (the first colun is just informative text).

The image in anex presents an example of what i need to do in LimeSurvey Plataforms, so my questions are, can this be done ? and how can i do this?



I thank you, in advance for all attention that might be spent in this subject.
Attachments:
Last edit: 2 years 3 weeks ago by Rexha.

Please Log in or Create an account to join the conversation.

More
2 years 3 weeks ago #153262 by tpartner
You will need to insert the HTML table into the question text and then use JavaScript to move the radio buttons into the inserted table. What version of LimeSurvey are you using?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

Please Log in or Create an account to join the conversation.

More
2 years 3 weeks ago #153331 by Rexha
Thank you for the quick replay.

The LimeSurvey i am using is Version 2.06+ Build 151018.

I don't know programing at all, however i have tryed to follow your sugestion and did a HTML code as you mentioned, and pasted it in the predefined matrix answer field. The result is shown bellow, if i'm not mystaken this way each colun will be a variable in my database, just the way i need it. But, still idk how to apply java script to make the right side text be in the same level (aligned) with the other text... Can u give me further information?

Aside note, I will have to build 81 tables all containing differente text information, there isnt any other method more simple to do this?

Attachments:

Please Log in or Create an account to join the conversation.

More
2 years 3 weeks ago - 2 years 3 weeks ago #153334 by tpartner
Well, that's not exactly how I would have done it but it works.

So, just to be clear, you want the "Tipo Combustivel..." up beside the "Veículo Básico..."?

Regarding the data, each column is an answer to the subquestion so this will result in one column in the data with 5 possible answers.

Sorry, there is no simpler way to do it.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Last edit: 2 years 3 weeks ago by tpartner.

Please Log in or Create an account to join the conversation.

More
2 years 3 weeks ago #153335 by jelo

Rexha wrote: Aside note, I will have to build 81 tables all containing differente text information, there isnt any other method more simple to do this?

LimeSurvey is not suitable for Choicetasks. Consider using a proper tool like Sawtooth Software.
That way you ensure that you don't have the same stimulus order for every respondent.
You be able to create eg. 300 different stimulus plans which will bring much more robust data. To create choice tasks on the same quality level in LimeSurvey cost you a lifetime, since you have to create every set manually. If this is for a PhD you might check the experimental design first.



The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Attachments:

Please Log in or Create an account to join the conversation.

More
2 years 3 weeks ago #153337 by Rexha
Ty for the replays,

I would like the "Tipo Combustivel..." up beside to "Combustão" the "Veículo Básico" is the choice label.

Jelo, ty for the information about this other software i will for sure check it out. I aldredy designed the experiment with SPSS - applying factorial factor analysis, so i got 81cards wich i devided in 9 blocks, so i will do a survey with 9 different versions of it.

Please Log in or Create an account to join the conversation.

More
2 years 3 weeks ago #153346 by tpartner
Adding the following script to the question source will move the HTML of the sub-question up into the cell beside the answers.

<script type="text/javascript" charset="utf-8">
	$(document).ready(function() {
		$('#question{QID} table.subquestions-list').addClass('custom-array-1');
		$('#question{QID} table.subquestions-list thead td:eq(0)').remove();
		$('#question{QID} table.subquestions-list thead tr:eq(0)').prepend('<th />');
		$('#question{QID} table.subquestions-list thead th:eq(0)').html($('#question{QID} th.answertext:eq(0)').html());
		$('#question{QID} th.answertext:eq(0)').html('');
	});
</script>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

Please Log in or Create an account to join the conversation.

More
2 years 3 weeks ago #153359 by Rexha
Once more ty for the quick replay.

Srry for my nuub question, but I belive that to acess the question source, i would need to have admin powers of the plataform. I don't see were can i add the JavaScript code in the interface i have. Any hints :/ ?

Please Log in or Create an account to join the conversation.

More
2 years 3 weeks ago #153364 by tpartner
See here for info on how to use JavaScript - manual.limesurvey.org/Workarounds:_Manip....29_in_LimeSurvey.3F

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

Please Log in or Create an account to join the conversation.

More
2 years 3 weeks ago #153416 by Rexha
I apreciate for the quick replay.

So, i have been now inserting my data in the survey and because not all colums have the same number of lines .. this mean i would have to adjust the 81 cards i need to do by hand + HTML + JavaScrip adjust at all time, and the final result would be to much text gather together and looking desorganized which would lead to people not even read the info.

So my last question is can it be made with an Image and then be added the radio buttons to each colun of the image? (ofc that in terms of database i want it to be one variable with 5 possible awnsers).

Attachments:

Please Log in or Create an account to join the conversation.

More
2 years 3 weeks ago #153427 by tpartner
Yes, you can use images...

1) Place the appropriate image in the first (and only) sub-question text of the array. Do not place any other text there.

2) Add this slightly modified script in the source of the question text of the array. It will hide the existing header row of the array, insert a new header row and move the image up into that new row.
<script type="text/javascript" charset="utf-8">
	$(document).ready(function() {
		var columnCount = $('#question{QID} table.subquestions-list thead tr:eq(0) > *').length;
		$('#question{QID} table.subquestions-list').addClass('custom-array-1');
		$('#question{QID} table.subquestions-list thead thead tr:eq(0)').hide();
		$('#question{QID} table.subquestions-list thead').append('<tr class="inserted-row"><td colspan='+columnCount+'></td></tr>');
		$('#question{QID} table.subquestions-list .inserted-row td:eq(0)').html($('#question{QID} th.answertext:eq(0)').html());
		$('#question{QID} th.answertext:eq(0)').html('');
	});
</script>

3) Place these style rules at the end of template.css. (these are for the default template so may need to be modified for others)
table.custom-array-1 {
	width: 100%;
	max-width: 1260px;
	border: 1px solid #333333;
}
 
table.custom-array-1 .inserted-row td {
	text-align: center;
	padding: 0;
}
 
table.custom-array-1 .inserted-row img {
	width: 100%;
}
 
table.custom-array-1 tr.array2:hover {
    background-color: #EEEEEE;
}
 
table.custom-array-1 td.answer-item:hover {
    background-color: #DDDDDD;
}

Here's a quick mock-up (you will, of course, need to tweak the image a bit).


Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Attachments:

Please Log in or Create an account to join the conversation.

More
2 years 3 weeks ago - 2 years 3 weeks ago #153428 by tpartner
...one more tip - set the array "(Sub-)question width" to 16.67. This will give you 6 even-width columns.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Last edit: 2 years 3 weeks ago by tpartner.

Please Log in or Create an account to join the conversation.

More
2 years 2 days ago #155074 by Rexha
Hello,

I have got working the tutorial that you put here. And we have made a test pilot survey, and just then i realized the images that i insert dont become dinamic, they are static. This means that when i see in my pc the ratio buttons colunms are align with the colunms of the image i have inserted, however in any other pc with a diff screen resolution than mine it looks that it ins't aligned. Can't it be made dynamic?

I apreciate in advance any time spent in this subject.

Best Regards,
R.R.

Please Log in or Create an account to join the conversation.

More
2 years 1 day ago - 2 years 1 day ago #155091 by tpartner
The image should be dynamic - it's styled to have a width of 100%.

Can you give a link to a short test survey containing only that question?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Last edit: 2 years 1 day ago by tpartner.

Please Log in or Create an account to join the conversation.

More
2 years 4 hours ago #155101 by Rexha
Here is one link that i prepared for you to see.

surveys.uc.pt/index.php/712367

Let me know what did we do wrong plz.


Ty for all your attention.

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!