Welcome to the LimeSurvey Community Forum

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

Hide radio buttons on an Array based on previous answers

  • davebostockgmail
  • davebostockgmail's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
4 years 10 months ago #185075 by davebostockgmail
Here is what I need to do ...

I have an array (numeric) with check boxes where the respondent can select multiple brands that each statement refers to.

I then have a second array that is single choice where I want to ask which of the brands is most relevant.

I used Denis' hide empty column plugin and it works effectively to only show the brands that had a positive answer (well on chrome but not on IE ... this is something I will have to live with I guess)

What I need to be able to do is hide the radio button for the answer where a brand and statement combination in the previous array has not been selected.

I am currently using LimeSurvey version 3.17.3
With the Hide empty column plugin

I have attached the .lss file with the questions that drive this


I am hoping it is as simple as something in JQuery that says if checkbox is not checked hide radio button.

Thanks
Dave
Attachments:
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 10 months ago #185076 by DenisChenu

davebostockgmail wrote: I used Denis' hide empty column plugin and it works effectively to only show the brands that had a positive answer (well on chrome but not on IE ... this is something I will have to live with I guess)

Can you report the issue on gitlab please ? With the exact version of IE.

hideEmptyResponse is more a workaround currently …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • davebostockgmail
  • davebostockgmail's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
4 years 10 months ago #185078 by davebostockgmail
Replied by davebostockgmail on topic Hide radio buttons on an Array based on previous answers
Hi Denis

I have made the report and included screenshots of the issues... it is Edge and IE version 11 where the columns are there.

Thanks
Dave
The following user(s) said Thank You: DenisChenu
The topic has been locked.
More
4 years 10 months ago #185080 by jelo
Link to the bugticket? I couldn't find it in the database.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • davebostockgmail
  • davebostockgmail's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
4 years 10 months ago #185081 by davebostockgmail
Replied by davebostockgmail on topic Hide radio buttons on an Array based on previous answers
I reported it on Gitlab as Denis asked .. this is a plugin so I am guessing that is where he wanted it?
The topic has been locked.
More
4 years 10 months ago #185083 by jelo
You're right. I looked in the LimeSurvey bugtracker.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 10 months ago #185096 by DenisChenu
Issue here : gitlab.com/SondagesPro/QuestionSettingsT...EmptyColumn/issues/3 :).

For mobile : it can be «easily» fixed in template (it's more easy in template, since only template kwnow @media used).

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • davebostockgmail
  • davebostockgmail's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
4 years 10 months ago #185119 by davebostockgmail
Replied by davebostockgmail on topic Hide radio buttons on an Array based on previous answers
Thanks for your Help Denis

Adding the following to the custom.js fixed the issue with the blank columns showing up.


/* Mobile Fix */
@media only screen and (max-width: 768px) {
td.hideEmptyColumn-hiddencolumn{display:none !important;}
th.hideEmptyColumn-hiddencolumn{display:none !important;}
}

/*IE 10 and 11 Fix */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
td.hideEmptyColumn-hiddencolumn{display:none !important;}
th.hideEmptyColumn-hiddencolumn{display:none !important;}
}

/*Edge Browser Fix */
_:-ms-lang(x), _:-webkit-full-screen, td.hideEmptyColumn-hiddencolumn{display:none !important;}
_:-ms-lang(x), _:-webkit-full-screen, th.hideEmptyColumn-hiddencolumn{display:none !important;}

I still need to understand how to target individual radio buttons to hide for the other part of my question,

is it simply a case of adding into jQuery something like

if answer to first array != "Y" then radio button style = display: none ?

if so then how would I script this in the question?
The following user(s) said Thank You: DenisChenu
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose