Welcome to the LimeSurvey Community Forum

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

Why is "Hide the question via CSS" not the option to hide the question?

  • jelo
  • jelo's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
6 years 3 months ago #172654 by jelo
Why is "hiding the question with CSS" not the option to hide the question?

Many workarounds work with hidden questions. The result looks often like this:


Wouldn't it save a lot of time and discussion, if the default way would be hide via CSS.

Hide via CSS.
Hide via HTML (removed from the HTML output).

Is there still a purpose to hide via Javascript?

bugs.limesurvey.org/view.php?id=11665

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 3 months ago #172729 by holch
But "Always hide this question" isn't via Javascript, is it? It is removing the HTML completely, which works fine if you work with EM, it doesn't if you need Javascript.

Then there is always the option to hide via CSS. I agree, it would be a lot more user friendly if this would be an option in a button as well, though.

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

The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
6 years 3 months ago #172740 by LouisGac
If you hide an input inside a form via css: this input will still be submitted, and the value inside the DB will be "NULL" (eg: User didn't answered, or choose "No Answer" option).

If you remove the HTML of the question via JS or from Twig/PHP, the input is not inside the form, and the value of the field inside the DB will be empty "" (eg: User didn't seen the question at all).

So it's 2 very different cases in the point of view of data analysis.
The topic has been locked.
  • jelo
  • jelo's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
6 years 3 months ago #172743 by jelo
Most of the time someone recommends to hide a question the way via CSS is essential.
The default behaviour of "Always hide this question" function should be CSS.

The strongest usecase for this way of hiding is to keep questions confidential from the public html code. Anything else?

The way it is implemented now has sideeffects.
E.g. one question in group in one survey.

If hidden by CSS you can finish survey. When hidden by "Always hide this question" the group is empty but LimeSurvey is stuck (no group in survey is not a typical situation, but Limesurvey should handle that. You could think of equation questions capturing data via URL. You could say that this is a bug how to handle empty groups and not an issue directly caused by hiding.

With implementing a class field a big step to reduce the burding of hiding via css was done.
I can remember the time, when there was no option "Always hide this question". I'm personally not in need of this changement, but I have seen a lot of users struggling and timeconsuming troubleshooting.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The following user(s) said Thank You: gracylayla
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
6 years 3 months ago #172750 by LouisGac
I've just answered you why in my above post.

For data analysis, people want to be able to make the difference between not answered and not seen.

Not answered (or hidden via CSS): null
No seen (or removed via JS): empty

The coming "Meta Data feature" will give a much more powerful way of recording what participant have actually seen or done, so this difference between null and empty (between hide via CSS or via JS) will not be that important anymore.
The topic has been locked.
  • jelo
  • jelo's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
6 years 3 months ago #172755 by jelo

LouisGac wrote: I've just answered you why in my above post.

Well, you explained the technical difference. You didn't explicitly answered the question ;-)

If I got you right, you see "Always hide this question" (since it is completely stripped from HTML) as equal to "Not seen" = empty.

Not answered (or hidden via CSS): null
No seen (or removed via JS): empty


Currently I cannot get NULL, when hiding via CSS.
On demo.limesurvey.org (Version 3.14.5) I get "" in the CSV export when hiding e.g "Long free text" question type via CSS. No difference in VV export as well.


I welcome the work on "not answered" as a separate answercode than not seen.
Will be interesting to see how that can be implemented over all questionstypes (E.g. sliders untouched with default visual value).

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
6 years 3 months ago #172760 by LouisGac
the difference between null and empty can be seen inside the DB, and in some format of export (SPSS if I remember well: not sure). So you will not see it when exporting to CSV.


As a PHP coder, I must say that for me empty == null == 0 == "" == false :lol:
docs.google.com/spreadsheets/d/1oWsmTvEZ...ldUw/pub?output=html

So I've been very surprised when I've seen that LimeSurvey, which is a PHP application, was using such a difference.


So clearly, the difference between not seen and not answered is not strong enough, and paradatas will fix that.
The topic has been locked.
Moderators: holchtpartner

Lime-years ahead

Online-surveys for every purse and purpose