Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

The use of Tables in Questions

  • brunotoday
  • brunotoday's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 4 days ago - 6 years 4 days ago #167338 by brunotoday
The use of Tables in Questions was created by brunotoday
Hello,

I've been searching the forum for questions about tables, but all I've found was questions regarding an array/matrix of answers, so this is why I'm starting a new topic about it.

I'm facing some issues with a survey regarding prospect choice preferences. Essentially, a prospect is a set of probabilities and possible outcomes. In my research, I want the participant to pick one of two prospect options. I want the prospects to be shown side by side, so the participant can easily compare them and won't be biased by the fact that one is shown above/below. So, at first, I tried to make a table like the following:
|
Prospect A
Prospect B
Chances (%) Possible Outcome|Chances (%) Possible Outcome
36% chance Earning $5529.10|32% chance Earning $5598.21
43% chance Earning $3188.70|24% chance Earning $5022.20
33% chance Earning $4779.10|44% chance Earning $2150.59

As you can possibly see, even here is hard to display this table in a readable way. But in LimeSurvey it got really weird, the table got giant and the prospects are shown too distant from each other (template: default, but in none of the available ones it got much better). Looks like the "table" element is set to fill the whole available width, but in that case it isn't a good idea, and I don't know how to change it.

Furthermore, I tried to upload the pair of prospects as pictures. It worked for desktops, but for mobile don't - the images are displayed too large and the participant has to scroll it, so he/she can't see both at the same time.

What can I do to fix that or to show it any better?

Things that could be useful for me:
  • Any better ways to show the table more clearly and readable
  • A way to show my inputs together/within the tables would be a great plus, if it's actually possible
  • Any improvement suggestions that don't require programming skills

I appreciate any answer!!

Best regards,
Bruno Moreira-Guedes
Last edit: 6 years 4 days ago by brunotoday.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 4 days ago - 6 years 4 days ago #167339 by Joffm
Replied by Joffm on topic The use of Tables in Questions
Hi, Bruno,
as far as I understand you are going to display a simple semantic differential.


Of course you can improve the wording.

So, please read: manual.limesurvey.org/Question_type_-_Array
The second chart in "General description"

Regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 6 years 4 days ago by Joffm.
The following user(s) said Thank You: MatthieuB
The topic has been locked.
  • brunotoday
  • brunotoday's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 4 days ago - 6 years 4 days ago #167340 by brunotoday
Replied by brunotoday on topic The use of Tables in Questions
Hello Joffm,

First, thanks for your answer! I appreciate to know that resource. Unfortunately, after taking a look at the documentation, and trying a "hands on" approach, it looks like it's not what I'm looking for. The problem in this approach is that my participan't shouldn't choose between "36% chance Earning $5529.10" and "32% chance Earning $5598.21". Rather, he/she should choose between the whole "Prospect A" and the whole "Prospect B".

A perfect solution in this approach would be something like this:


However, a simpler solution would be fair enough. Just a way to make my table look like this would be nice. Unfortunately, it's currently looking like this:


The tables looking closer would be enough for me by now!!

PS: You see an input box rather than a radio box because I'm currently testing an alternative approach. But the main one is based in the radio boxes.

Best regards,
Bruno Moreira-Guedes
Last edit: 6 years 4 days ago by brunotoday. Reason: Adding a PS note
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 4 days ago - 6 years 4 days ago #167342 by Joffm
Replied by Joffm on topic The use of Tables in Questions
Okay, Bruno,
well, this is something different.

By the way: You did not tell us which LS version you are using.
Because you mentioned the "default" template I assume it is the 2.50-2.73 branch.

What do you think about this quick solution?


It's still the semantic differential, but with only one row, styled a very little bit.
I entered this as subquestion:
Code:
<div style="float:right;border:1px solid red;padding:5px;background-color:#ddd"><span style="font-weight:bold"><u>Prospect A</u></span><br><span style="color:blue;font-weight:normal">36% chance Earning $5529.10<br>43% chance Earning $3188.70<br>33% chance Earning $4779.10</span></div>|<div style="float:left;border:1px solid red;padding:5px;;background-color:#ddd"><span style="font-weight:bold"><u>Prospect B</u></span><br><span style="color:blue;font-weight:normal">32% chance Earning $5598.21<br>24% chance Earning $5022.20<br>44% chance Earning $2150.59</span></div>

Of course you can improve or change the styling.

To have the text right aligned in the left box, enter in the question text
Code:
<style type="text/css">
.answertext {
   text-align:right
}
</style>



Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 6 years 4 days ago by Joffm.
The following user(s) said Thank You: brunotoday
The topic has been locked.
  • brunotoday
  • brunotoday's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 4 days ago #167378 by brunotoday
Replied by brunotoday on topic The use of Tables in Questions
Hey Joffm, thanks again!!

The provided solution is AWESOME!! I'll test it right now and let you know.

By the way, my LimeSurvey version is 2.73.0+171219.

Best regards,
Bruno Moreira-Guedes
The topic has been locked.
  • brunotoday
  • brunotoday's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 2 days ago #167468 by brunotoday
Replied by brunotoday on topic The use of Tables in Questions
Hey Joffm,

Would you mind if I ask you something else (related)?

I did some tests here. Your solution worked perfectly, couldn't imagine better!!

The new challenge, now, is for the questions of prospect allocation - where instead of choosing one, the participant will define an amount to allocate for each prospect.

I tried the same approach, but with a Multiple Numeric Input type, and got the following:


Is there a way to make them stay side by side? How do I find it?
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 2 days ago #167472 by Joffm
Replied by Joffm on topic The use of Tables in Questions
Hi, Bruno,
would have been nice, if you attached your sample as *.lss

My idea is to use an array(numbers).
Your descriptions are the x-axis labels.

Something like this


Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: brunotoday
The topic has been locked.
  • brunotoday
  • brunotoday's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 14 hours ago - 6 years 14 hours ago #167597 by brunotoday
Replied by brunotoday on topic The use of Tables in Questions
Hello Joffm!

I apologize for taking that long to answer, but these days have been time consuming. Just to provide you a feedback, I loved your idea to put HTML in the subquestions/answer options. I liked your new suggestion, the side-by-side array, and indeed I found a way to make it work after some time of try-and-error. However, I think that "remaining value" thing in the multiple numeric input (it wasn't an x-axis array, actually) very friendly to the participant.

I thought the prospects on the x-axis would be a problem and make it hard to compare, but my professor has seen and she just loved it, and... After some tuning it became really useful, as we gained some room in the question description by putting some instructions in the subquestion. The result ended up like this:


PS: I didn't knew I could post the question file here, but after I became forced to change it to another server yesterday, I've learned some tricks. So now I'm adding it, case anyone finds it useful!!

File Attachment:

File Name: PA001_neutral.lsg
File Size:10 KB


Thanks for all your guidance, I've learned a lot these days.
Last edit: 6 years 14 hours ago by brunotoday. Reason: Including a thank you in the end
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose