Welcome to the LimeSurvey Community Forum

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

Array - multiple buttons within a cell

  • boshra.m
  • boshra.m's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
2 years 1 week ago #233268 by boshra.m
Array - multiple buttons within a cell was created by boshra.m
Please help us help you and fill where relevant:
Your LimeSurvey version: LimeSurvey Cloud Version 5.4.7
Own server or LimeSurvey hosting: LimeSurvey hosting
Survey theme/template: Fruity
==================
Hello,

I was wondering if it was possible to do something like the attached below with an array type question? (in one table).

Honestly this is way advanced for me which is why I'm not even sure of a starting point. Just thought to ask here just in case someone may have an idea. 

Thank you very much.

 

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 1 week ago #233278 by tpartner
Replied by tpartner on topic Array - multiple buttons within a cell
I don't have time for development today but two thoughts...

1) Insert drop-downs into an array-texts question. Joffm has given many examples of this.

2) Five list-radio questions moved into a custom table coded in a text-display question.

Cheers,
Tony Partner

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

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 1 week ago - 2 years 1 week ago #233287 by Joffm
Replied by Joffm on topic Array - multiple buttons within a cell
See here,

1. Something like your vertical buttons (second example)
[url] forums.limesurvey.org/forum/can-i-do-thi...ultiple-scale#225294 [/url]
Maybe you can adapt to your needs, each row different options
 

2. array(text) with dropdowns (different options in each row)
[url] forums.limesurvey.org/forum/design-issue...ions?start=15#215118 [/url]
 

3. As you have only one column you may use a "multiple short text" with different dropdowns in each subquestion
In this example there are always the same options (prov1).
You may create several and insert respectively
[url] forums.limesurvey.org/forum/spanish-foru...ntes?start=15#230946 [/url] 

4. Multiple arrays merged with css classes "no-question" and "no-bottom"

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 2 years 1 week ago by Joffm.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 1 week ago #233293 by Joffm
Replied by Joffm on topic Array - multiple buttons within a cell
5. HTML-table in question text with inserted radio buttons
Very rough without any better styling
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • boshra.m
  • boshra.m's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
2 years 1 week ago - 2 years 1 week ago #233294 by boshra.m
Replied by boshra.m on topic Array - multiple buttons within a cell
Hi Joffm,

Thank you for your responses! #1. is working great. I actually changed it to checkboxes and am now working on figuring out how to restrict it so that they can answer a maximum of 2 answers per row with 1 answer per column (within the row). If you have any hints or ideas, that would be really greatly appreciated.
Last edit: 2 years 1 week ago by boshra.m.

Please Log in to join the conversation.

  • boshra.m
  • boshra.m's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
2 years 1 week ago #233321 by boshra.m
Replied by boshra.m on topic Array - multiple buttons within a cell
Okay weirdly when I duplicated the first question it doesn't show as the same style when previewing the survey and in group mode. But it does show it how I want when I preview the question by itself. I checked the source and I don't see anything but yeah I'm not sure why this is happening. 

   

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 1 week ago #233325 by Joffm
Replied by Joffm on topic Array - multiple buttons within a cell
Hi, 
and...?
Where is the lss export of this question resp. group?
How can we say something without seeing what you did?

Joffm

And: What a waste of space, instead of a simple drop-down

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • boshra.m
  • boshra.m's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
2 years 1 week ago #233328 by boshra.m
Replied by boshra.m on topic Array - multiple buttons within a cell
Hello,

Sorry I thought I had also attached it.

 yeahh, I just get told what to do.

 

File Attachment:

File Name: 3.1 Test.lss
File Size:59 KB


 

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 1 week ago #233351 by Joffm
Replied by Joffm on topic Array - multiple buttons within a cell
I have no idea.
The script of the second question is not fired even if you only insert an "alert('Hello');"

But this script is originally of one of our Polish users.
You see that it looks very different from the usual ones here.

BUT:
I still do not know, if there are different answer options (what you showed in your first post) or not (as in your sample survey)
Nevertheless, you can do that.

For different answer options use an array(text) with several subquestions.
Insert the radios for each subquestion and
change 
$('.answer-item.answer_cell_a', thisQuestion).addClass('with-select').append(
to
$('tr.subquestion-list:eq(x) .answer-item.answer_cell_a', thisQuestion).addClass('with-select').append(
with x as the number of the subquestion starting at 0.

And the usual way to insert subheaders
[url] forums.limesurvey.org/forum/german-forum...nlich-doppelt#207884 [/url]

In my opinion this is not too bad.

 

Joffm
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: boshra.m

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 1 week ago #233358 by tpartner
Replied by tpartner on topic Array - multiple buttons within a cell

Okay weirdly when I duplicated the first question it doesn't show as the same style when previewing the survey and in group mode. But it does show it how I want when I preview the question by itself. I checked the source and I don't see anything but yeah I'm not sure why this is happening.

JavaScript error...

 

 

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: boshra.m

Please Log in to join the conversation.

  • boshra.m
  • boshra.m's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
2 years 1 week ago #233364 by boshra.m
Replied by boshra.m on topic Array - multiple buttons within a cell
Hello!

You're idea is great and will help me with another question, thank you. Alas, my concern is that with keeping it in the big table, I want to respondents to only be allowed to select 1 answer per box, so they would be allowed to make 6 choices max, with no box having 2 answers. Hope I am making sense. I am ust not sure how to do the question validation with this type of question. 

 

File Attachment:

File Name: limesurvey...5551.lss
File Size:41 KB

Please Log in to join the conversation.

  • boshra.m
  • boshra.m's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
2 years 1 week ago #233365 by boshra.m
Replied by boshra.m on topic Array - multiple buttons within a cell
Hello,

Oh okay, thanks for finding that! Is that something I can fix? 

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose