Welcome, Guest
Username: Password: Remember me

TOPIC: hide questions, execute jquery code.

hide questions, execute jquery code. 2 years 4 months ago #75935

  • mmirasol
  • mmirasol's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 42
  • Karma: 0
Hello Guys,

I'm wondering if there's a way to hide questions in lime. At the moment, I have to use css to hide certain questions. I saw the attribute 'always hide this question' but observed that it excludes the question completely instead of just adding style='display:none'.

An example of a question I need is like the one in the attached a6 image. I created a multi text array, added an html textbox for the 'other, please specify' box and jquery code to record the input text in a hidden short text question.

Is there a quicker way to do this in lime?
Attachments:
Last Edit: 2 years 4 months ago by mmirasol.
The administrator has disabled public write access.

Re: hide questions, execute jquery code. 2 years 4 months ago #75937

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
Another option is to create an always-hidden Equation question and have your jQuery populate it. Hidden Equations are always present in the JavaScript since their values may be used for branching, validation, or tailoring (unlike other always-hidden questions, which have no HTML rendered at all, as you saw. Values entered into Equation questions are stored in the database.

If you feel like hacking LimeSurvey code, there is already an "other" option for many other question types. It would be nice to have it available for array type questions in the manner your display. If it were, all of the array_filter and array_filter_exclude logic would immediately work for them, so it's just a matter of tweaking qanda.php
The administrator has disabled public write access.

Re: hide questions, execute jquery code. 2 years 4 months ago #75938

  • mmirasol
  • mmirasol's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 42
  • Karma: 0
Hi Tom,

Thanks for the advise. I will have a look at these files. =) BTW, how is v1.92 going? Do we have a new scheduled date for the stable release? =)

Mark
Last Edit: 2 years 4 months ago by mmirasol.
The administrator has disabled public write access.

Re: hide questions, execute jquery code. 2 years 4 months ago #75939

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
It was quietly released last Friday. You can get it here: www.limesurvey.org/en/download
The administrator has disabled public write access.

Re: hide questions, execute jquery code. 2 years 4 months ago #75940

  • mmirasol
  • mmirasol's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 42
  • Karma: 0
oh. hehe thanks. I've been waiting for an announcement on the front page. =)
The administrator has disabled public write access.

Re: hide questions, execute jquery code. 2 years 4 months ago #75966

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6207
  • Thank you received: 788
  • Karma: 238
TMSWhite wrote:
Another option is to create an always-hidden Equation question and have your jQuery populate it. Hidden Equations are always present in the JavaScript since their values may be used for branching, validation, or tailoring (unlike other always-hidden questions, which have no HTML rendered at all, as you saw. Values entered into Equation questions are stored in the database.
Hello Tom,

Why don't have :
hidden attribute:
- No
- Completely remove from HTML
- Hide in CSS

For all question type ?

Actual "hidden" become Completely remove from HTML for compatibility issue.

I think some user can hide completly some validation question to activate after some month when it's needed for example :).

Denis
The administrator has disabled public write access.

Re: hide questions, execute jquery code. 2 years 4 months ago #76005

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
Denis-

The three options for always-hidden are exactly what Carsten recommends for the future (e.g. 2.0, and possibly 1.92+)

/Tom
The administrator has disabled public write access.
The following user(s) said Thank You: DenisChenu

Re: hide questions, execute jquery code. 2 years 4 months ago #76011

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6207
  • Thank you received: 788
  • Karma: 238
TMSWhite wrote:
The three options for always-hidden are exactly what Carsten recommends for the future (e.g. 2.0, and possibly 1.92+)
Oups ...
:blush:

:hammer:
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.137 seconds
Donation Image