Welcome to the LimeSurvey Community Forum

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

Multiple choice table - Discrete choice Models

More
6 years 11 months 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.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 11 months ago - 6 years 11 months ago #155091 by tpartner
Replied by tpartner on topic Multiple choice table - Discrete choice Models
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.
Last edit: 6 years 11 months ago by tpartner.
The topic has been locked.
More
6 years 11 months 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.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 11 months ago #155115 by tpartner
Replied by tpartner on topic Multiple choice table - Discrete choice Models
You have given the image width and height styles. Remove those in the HTML editor.


Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
6 years 11 months ago #155186 by Rexha
Thank you very much for all the help :D!!!

It's nicely working.
The topic has been locked.
More
6 years 1 month ago #164697 by Rexha
Hello,

My LimeSurvey got updated to Versão 2.73.0+171219.

The solution gave has stopped working, thus I would like to know if in this version there is any new and easier way to get it done?

(Note: this time I just need users to select one of two columns).
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 1 month ago - 6 years 1 month ago #164703 by holch
I love it. So your organization just updated from a really, really old version of Limesurvey to another old version that received no support and no bug fixes anymore? I guess they'll upgrade to 3.x once 4.x is released... ;-)

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Last edit: 6 years 1 month ago by holch.
The following user(s) said Thank You: jeremt
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 1 month ago #164707 by tpartner
Replied by tpartner on topic Multiple choice table - Discrete choice Models
Use this for the JavaScript:

Code:
<script type="text/javascript" charset="utf-8">
  $(document).on('ready pjax:scriptcomplete',function(){
    var columnCount = $('#question{QID} table.subquestion-list thead tr:eq(0) > *').length;
    $('#question{QID} table.subquestion-list').addClass('custom-array-1');
    $('#question{QID} .no-more-tables').removeClass('no-more-tables');
    $('#question{QID} .answer-item .visible-xs-block.label-text').remove();
    $('#question{QID} table.subquestion-list thead tr:eq(0)').hide();
    $('#question{QID} table.subquestion-list thead').append('<tr class="inserted-row"><td colspan='+columnCount+'></td></tr>');
    $('#question{QID} table.subquestion-list .inserted-row td:eq(0)').html($('#question{QID} th.answertext:eq(0)').html());
    $('#question{QID} th.answertext:eq(0)').html('');
  });
</script>

And, this for the CSS:

Code:
table.custom-array-1 .inserted-row td {
  text-align: center;
  padding: 0;
}
 
table.custom-array-1 .inserted-row img {
  width: 100%;
}

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: jeremt
The topic has been locked.
More
5 years 10 months ago - 5 years 10 months ago #170354 by Rexha
Hello,

So I have made a new questionnaire of Discrete choice.

However, now I have different problems than before.

The displacement between the question and the answer row is too big.
Aswell the tables display in phone screen sucks.

Here is a link with an example that I prepared:
surveys.uc.pt/index.php/488679?lang=pt

Basically i have inserted the table in the question infobox, then the subquestion field is empty ( and i think that's why there is a big space between the question and the answer row).

Regarding the display problem I have no idea, besides i don't have access to the platform programming files. Still, i have contacted the administrator and he told me that my LimeSurvey version is compatible with mobile phone display (LimeSurvey
Versão 2.73.0+171219).

Thanks in advance for any help or time spent on this subject.
Last edit: 5 years 10 months ago by Rexha.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 10 months ago #170356 by tpartner
Replied by tpartner on topic Multiple choice table - Discrete choice Models
I think it will be almost impossible to get things to line up correctly on mobile devices if using separate tables. I would add another row to your info table and then use JavaScript to move the radios into that row.

Can you attach a small test survey containing only a single question?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
5 years 10 months ago #170360 by Rexha
Here is a new link as requested, with only one question:
surveys.uc.pt/index.php/797519?lang=pt

I dunno that it will help, but this is my table code:

<table border="0" cellpadding="0" cellspacing="0" style="border-collapse:collapse;">
<tbody>
<tr>
<td style="text-align: center;" width="0%"> </td>
<td style="text-align: center;" width="0%"> </td>
<td bgcolor="#D4D7E4" style="text-align: center;" width="40%"><br />
<span style="font-size:24px;"><strong>BANANAS</strong></span><br />
 </td>
<td style="text-align: center;" width="0%"> </td>
<td bgcolor="#D4D7E4" style="text-align: center;" width="40%"><span style="font-size:24px;"><strong>GREEN APPLES</strong></span></td>
</tr>
<tr style="height: 6px; text-align: center;">
</tr>
<tr>
<td bgcolor="#f2f2f2" style="text-align: center;">
<p><span style="font-size:12px;"> </span><br />
<span style="font-size:18px;">Type of Vitamins</span><span style="font-size:12px;"> </span></p>
</td>
<td style="text-align: center;" width="0%"> </td>
<td bgcolor="#f2f2f2" style="text-align: center;">
<p> </p>

<div><span style="font-size:20px;"><strong>XX</strong></span></div>

<p> </p>
</td>
<td style="text-align: center;" width="0%"> </td>
<td bgcolor="#f2f2f2" style="text-align: center;"><span style="font-size:20px;"><strong>XXXX</strong></span></td>
</tr>
<tr style="height: 6px; text-align: center;">
</tr>
<tr>
<td bgcolor="#f2f2f2" style="text-align: center;"><span style="font-size:18px;">Hidratos</span></td>
<td style="text-align: center;" width="0%"> </td>
<td bgcolor="#f2f2f2" style="text-align: center;">
<p><span style="font-size:20px;"><strong>SUGAR</strong></span><br />
<br />
<span style="font-size:16px;">Bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla blabla bla bla bla bla bla bla bla blabla bla bla bla bla bla bla bla blabla bla bla bla bla bla bla bla bla blabla .</span></p>
</td>
<td style="text-align: center;" width="0%"> </td>
<td bgcolor="#f2f2f2">
<p style="text-align: center;"><span style="font-size: 20px;"><b>ACID JUICE</b></span><br />
<span style="font-size:16px;">Bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla blabla bla bla bla bla bla bla bla blabla bla bla bla bla bla bla bla blabla bla bla  bla bla bla bla bla bla blabla .</span></p>
</td>
</tr>
<tr>
<td bgcolor="#f2f2f2" style="text-align: center;"><span style="font-size:18px;">Price</span></td>
<td style="text-align: center;" width="1%"> </td>
<td bgcolor="#f2f2f2" style="text-align: center;"><br />
<b>1 Kg - 1€</b><br />
 </td>
<td style="text-align: center;" width="1%"> </td>
<td bgcolor="#f2f2f2" style="text-align: center;"><strong>1Kg - 0.95 €</strong></td>
</tr>
</tbody>
</table>
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 10 months ago #170361 by tpartner
Replied by tpartner on topic Multiple choice table - Discrete choice Models
Can you please attach an export (.lss file) of a survey, not a link?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose