Welcome to the LimeSurvey Community Forum

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

Multiple number question in multiple columns

  • Mon2016
  • Mon2016's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 3 months ago #209947 by Mon2016
Hello everyone,

Before anything else, I want to wish you a great year 2021 for each of you.

I tell you that I am doing a simulation purchase survey, where several products will be shown and the participant must select the product and the quantity of it that he buys regularly.
Below is an example of what I am trying to do.

The participant must enter in the number box the amount he buys in stores, I want to add that to each product I must place the image of the product as I show in the examples.

I tried to do it with a multiple number question but I can't separate it into columns to show it so that the participant doesn't have to scroll down.

I forgot to mention that for this survey I am using Version 2.50+ Build 160414


I have done several exercises and have looked in the manual on how to ask this type of question but unfortunately I have not been able to find anything that can give me an idea.

I would be infinitely grateful if someone on the forum could guide me to run this question as I wish.

Thank you all for your comments.

¡Happy year 2021!
The topic has been locked.
  • Mon2016
  • Mon2016's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 3 months ago #209984 by Mon2016
Replied by Mon2016 on topic Multiple number question in multiple columns
Hi again, everybody,

I comment that I have not yet managed to correctly execute the question.

However I have been doing some testing and what I see as an option is to ask a multiple choice question as I show now:



The idea is that the participant selects the product and opens a number box so that they can write the number of the product they usually buy.

But now the dilemma is that I don't know if this is possible.

I would appreciate if anyone has any solutions for this.

Greetings to all.

Thank you!
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 3 months ago #209987 by Joffm
Hi,
the cleanest way is to split the question.

1. Ask "Which do you buy regularly?" in a multiple question with some columns
2. Ask the numbers; either use "array filter" or "subquestion relevance" to show only the selected ones.
This should maximal be three or four (you ask "buy regularly")

This way you can manage the screenout of "Ninguno" and the "Other" option quite well.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • Mon2016
  • Mon2016's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 3 months ago #210006 by Mon2016
Replied by Mon2016 on topic Multiple number question in multiple columns
Thanks Joffm,

From the beginning I thought about doing it the way you mentioned it, just try to find an alternative since I must show 10 versions with 12 scenarios each like the ones I show in the example, so that it was not too heavy for him. competitor.

Thanks for your time.

hug.
The topic has been locked.
More
3 years 3 months ago #210132 by Fran1991
Replied by Fran1991 on topic Multiple number question in multiple columns
Hello,

Sorry to return to the topic,

I find myself in a similar problem.

I do not know if someone managed to place a multiple numerical question in several columns or in their case as @ Mon2016 mentions if it is possible to add a numerical box if they select the option.

I did this as Joffm mentions, but my client insists he wants it on one screen.

Thank you all.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 3 months ago - 3 years 3 months ago #210137 by Joffm
Hi,
first, my solution IS on one screen, both questions in one group, survey displayed "group by group".
As laways recommended: If you want to display "question by question", put each question into one group and display "group by group".
This way you are very flexible.

but my client insists he wants it on one screen.

Did you tell him that this highly customized development will be expensive and your quotation did not cover this? ;)

But here is something else


This is a group with six questions.
1. The header with the question text. (a question of type "text display" and the css class "no-bottom")
2.-5. The answer options (questions of type "multiple with comment" with css classes "col-sm-3 no-question no-bottom")
6. A footer - to have an option "none of them" and a line at the end (a question of type "multiple" with the css class "no-question")

You may use "multiple numerical input" as well.

As there are several questions you have to validate to avoid a "None of them" and other inputs.


"col-sm-3" is a bootstrap class
The other here:
Code:
.no-question{border-top:0;}
.no-question .question-title-container{display:none;}
.no-question .question-valid-container{display:none;}
.no-question .answer-container {
    padding-top: 0em;
    padding-bottom: 0.5em;
}
.no-question .ls-answers {padding-top: 0px;}
 
.no-bottom {
    border-bottom:0;
    margin-bottom:0;
}
.no-bottom .answer-container {padding-bottom: 0em;}
.no-bottom .ls-answers {
    padding-bottom: 0;
    margin-bottom: 0;
}

By the way: In the "skelvanilla" theme this grouping of questions is included.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 years 3 months ago by Joffm.
The topic has been locked.
  • Mon2016
  • Mon2016's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 3 months ago #210143 by Mon2016
Replied by Mon2016 on topic Multiple number question in multiple columns
Thanks Joffm

You are right, I will have to speak to the client about the quote. ;) :)

You are a genius, this looks great.

I'm really not very good at using css in LS.

I made the 6 questions in a group as you mention.

However I can't find where to put css to take me to the design that you kindly helped show me.

I am using the same version as @ Mon2016 (Version 2.50)

I would infinitely appreciate if you could guide me to be able to ask this question.

Thanks once again
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 3 months ago #210145 by Joffm
Oh, really 2.50?

Usually these general css classes are put into the "custom.css"; in version 2.50 it was called "template.css", wasn't it.

So it will probably not work.
As you saw, it depends on bootstrap classes.
But only versions 3.x and newer are based on bootstrap.

I will have a look at it.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
More
3 years 3 months ago #210146 by Fran1991
Replied by Fran1991 on topic Multiple number question in multiple columns
Yes. sorry...

I'm about to update the system to version 3x. :)

I will try to do it in template css to see if any of this works and come back in case there is something I managed to work.

Thank you very much joffm. :)
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 3 months ago #210152 by Joffm
Hi, works in Version 2.73.1+171220



Images have to have the same height.
And a small revision of the css.
Code:
.no-question{border-top:0;}
.no-question .question-title-container{display:none;}
.no-question .questionvalidcontainer {
    display:none;
    padding-bottom:0em;
}
.no-bottom.question-container {
    margin-bottom: 0em !important;
}    
.no-question .answer-container {
    padding-top: 0em;
    padding-bottom: 0.5em;
}
 
.no-bottom {
    border-bottom:0;
    margin-bottom:0;
}
.no-bottom .answer-container {padding-bottom: 0em;}

You may adapt to your needs. I am not so very familiar with this version as this - my - version is more than 3 years old, and yours (the latest release that was called 2.50) nearly 4 and a half years.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
More
3 years 3 months ago #210153 by Fran1991
Replied by Fran1991 on topic Multiple number question in multiple columns
Thank you very much joffm.

I made the group with the 6 questions you mentioned.

As you can see, I'm not very good at CSS, I put the CSS in the template.css of a new template, but this does not do what you show in the image.

I do not know if it has to go in the templete.css file of the general template or this CSS has to go each question in the CSS section that has each question.

File Attachment:

File Name: limesurvey...1738.lss
File Size:27 KB


Thanks for your patience, the truth is I am very sorry with this simple issue.

Attached lss survey so you can see in more detail if what I do is correct.

Once again, thank you very much
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 3 months ago - 3 years 3 months ago #210157 by Joffm
Hi,
don't be surprised that it doesn't qwork if you don't do what you are told.

1. The header with the question text. (a question of type "text display" and the css class "no-bottom")
2.-5. The answer options (questions of type "multiple with comment" with css classes "col-sm-3 no-question no-bottom")
6. A footer - to have an option "none of them" and a line at the end (a question of type "multiple" with the css class "no-question")


There is nothing entered in the css classes

Should be (example)


Then: The questions can't be "mandatory". In this case in each of the questions at least one subquestion must be selected.
You have to assure this by validation.
Something like:
count(that.Q2.NAOK,that.Q3.NAOK, that.Q4.NAOK, that.Q5.NAOK)>0



Of course, you have to take into account Q6 as well, though at the moment I do not know what the question is.
Or is it a different, next question?

Like this?



Joffm

P.S. To remove the horizontal line you may add to the temlate.css
Code:
.no-bottom .question-help-container {display:none; }

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 years 3 months ago by Joffm.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose