View Issue Details

This bug affects 1 person(s).
 12
IDProjectCategoryView StatusLast Update
04911Bug reportsConditionspublic2011-03-21 23:10
Reportertimbee Assigned Toc_schmitz  
PrioritynormalSeverityminor 
Status closedResolutionnot fixable 
Product Version1.91RC2 
Target Version1.91RC4 
Summary04911: "Always hide this question" doesn't produce any html at all (should produce input html code, but with display:none)
Description

Advanced Question Option->Display->Always hide this question
does not work properly.
I was told this was a problem when combined with question conditionals (see forum post #55894, and #47197)
The description of "Always hide this question" says "This is useful for including data using answer prefilling", but when running the survey, the question that has AlwaysHide set to True will not be displayed at all (ie: not even html code with display:none as the css), so no information is then stored in the DB (you can't auto-fill).

Steps To Reproduce

Create a new test survey,
create a new question group,
create a new test question 1,
create a new test question 2,
set the "Always hide this question" option to "Yes" for test question 1,
preview the survey,
view the source: only the html for test question 2 is displayed.

TagsNo tags attached.
Attached Files
Bug heat12
Complete LimeSurvey version number (& build)9672
I will donate to the project if issue is resolvedNo
BrowserFirefox 3.6.13
Database type & versionmysql 5.1.51
Server OS (if known)ubunti10.04
Webserver software & version (if known)apache 2.2.17
PHP Version5.3.3

Users monitoring this issue

jacopo

Activities

lemeur

lemeur

2011-01-29 19:06

developer   ~14000

Note for me:

  • see patch version 7705 applied by c_schmitz on the 2009-10-02
    "Added feature #3555: Question attribute to hide a question - patch by flohack"

In line 407:
// Should we really skip the question here, maybe the result won't be stored if we do that

Seems that the patch was just not complete.

DenisChenu

DenisChenu

2011-01-31 14:49

developer   ~14003

Last edited: 2011-01-31 14:55

With svn version, you can use this option to hide completely some question and use it in SGQA after.

Try:
http://limesurvey.sondages.pro/index.php?sid=59534&59534X16X350=TEST
http://limesurvey.sondages.pro/index.php?sid=59534&59534X16X350=Bloubiboulga

I upload lss for this test. For me there is no bug here.

You can use condition too if you put the hidden question before the question with condition (lss updated)

lemeur

lemeur

2011-01-31 14:59

developer   ~14004

@Shnoulle,

This feature is not only in SVN, but in RC3 as well and it's buggy ;-), at least for group by group surveys.

Can you test and post a test survey ?

Thibault

DenisChenu

DenisChenu

2011-01-31 15:12

developer   ~14005

Last edited: 2011-01-31 15:43

Yeap, And it's OK in 1.90 too and work like a charm.

Sorry it's OK only for question by question,
not in group by group and All in one.

QbQ : http://limesurvey.sondages.pro/index.php?sid=59534&59534X17X350=TEST : OK
GbyG: http://limesurvey.sondages.pro/index.php?sid=39466&39466X19X353=TEST : OK

I have to had a question in first group to have the functionnality.

All in one are bad, we have to use javascript condition only if SGQA are shown: it's the test to do i think.

lemeur

lemeur

2011-01-31 15:48

developer   ~14006

@Shnoulle,

I don't understand, you say "not in group by group", but you report a working group-by-group link ?
Or is it because you absolutely need to be sure that first group is displayed to get the feature working ?

[QUOTE]All in one ar bad[/QUOTE]
Lol, how can you say this... this is a mode used by most of our users...

The fact is that the "always hide" feature was partly implemented, and thus shouldn't have been applied to the trunk untill all aspects of the developpement have been properly done.

DenisChenu

DenisChenu

2011-01-31 15:55

developer   ~14007

[QUOTE]I don't understand, you say "not in group by group", but you report a working group-by-group link ?[/QUOTE]
I add a question to the group with the hidden question, and it's work. But i think the bug are for another think.

[QUOTE][QUOTE]All in one ar bad[/QUOTE]
Lol, how can you say this... this is a mode used by most of our users...[/QUOTE]
A lot of user use question by question ;).

And to complete the bug report :

  • Conditionnal question with an hidden question don't work if this hidden question are on the same page.

javascript issue, not php.
:)

lemeur

lemeur

2011-01-31 16:06

developer   ~14008

[QUOTE]Conditionnal question with an hidden question don't work if this hidden question are on the same page.[/QUOTE]

Hum this is another issue.
Can you open a new ticket for this one and attach a test survey (and assign it to me), please ?

Thibault

DenisChenu

DenisChenu

2011-01-31 16:11

developer   ~14009

Last edited: 2011-01-31 16:12

[QUOTE]Hum this is another issue.[/QUOTE]

I'm not agree: database are filled by $_GET[$field] like espected. We can't manipulate hidden question like espected.
If this issue are resolved then the "Conditionnal question with an hidden question don't work if this hidden question are on the same page" are resolved too :)

And if you put a display:none to hidden question, then you can't manipulate this too.
Maybe we have to have 2 hidden type question:
Hidden
Not really show (shown in HTML , but hide with CSS).

:)

lemeur

lemeur

2011-01-31 16:18

developer   ~14010

Sorry for otehrs, but I prefer to switch in French for now, and will make a summary later.

Shnoulle, pourquoi dis-tu qu'il s'agit du même problème ?
Peux-tu préciser le pb?
Peux-tu poster un questionnaire .lss et des étapes à suivre pour mettre en évidence le bug ?

Mazi

Mazi

2011-01-31 16:22

updater   ~14011

Let me add my 2 cents since the current behavior of this feature irritates many users and it has been discussed at the forum a lot: When hiding the question using the question attribute, the question's HTML should be created for the survey page but then be hidden using the according question ID and the "hide()" statement.
This way we can easily populte this question AND still use the populated question for conditions.

timbee

timbee

2011-01-31 19:53

reporter   ~14021

Mazi, that was my understanding of the functionality also.

Can anyone imagine a scenario where we don't even want to display the html? That's almost the same thing as disabling/deactivating the question it seems. maybe it should be.

DenisChenu

DenisChenu

2011-02-01 14:36

developer   ~14028

[quote]
Can anyone imagine a scenario where we don't even want to display the html? That's almost the same thing as disabling/deactivating the question it seems. maybe it should be. [/quote] fill the first question with a code of another database, for example a client number after buying some product.

:)

timbee

timbee

2011-02-01 17:36

reporter   ~14030

[quote]
fill the first question with a code of another database, for example a client number after buying some product.
[/quote]

but in the case of Not displaying the question, it does Not even display the HTML, so nothing will be saved in the database, because there is no form input for it to get data from.

This is what I originally wanted to use this feature for too: I had some javascript that would simply populate a hidden text input box with the timestamp. But because the question was marked as "Always hide this question", it did not display the text input in the html source, and so nothing was saved to the DB. I tested with 1.91RC2(9672)

DenisChenu

DenisChenu

2011-02-01 17:58

developer   ~14033

@ timbee :

With 1.90 and with 1.91RC3 : it work (with ative survey): the session was filled with all the database column name, and if there are a get survey with the SGQA, then database is filled with the good information.

For the 2 link testing , i have a lot of TEST ans some Gloubilga :).

I use a text short question to get the information.

timbee

timbee

2011-02-01 18:23

reporter   ~14034

@shnoulle
I'll test with 1.91RC3 and see what happens, thanks for the feedback

timbee

timbee

2011-02-02 00:07

reporter   ~14035

Okay, I installed Version 1.91RC3 Build 9715, and still no luck.
Here's what I did after installation:

+create a new survey
+create a new question group
+create four questions of type "short free text":

  • q1 mandatory:no, always_hide:no
  • q2 mandatory:no, always_hide:yes
  • q3 mandatory:yes, always_hide:no
  • q4 mandatory:yes, always_hide:yes
    • Activated the survey
    • Executed the survey

HTML RESULTS:
+Viewing the survey in the normal browser view, only q1 and q3 are displayed, with q3 having the mandatory red asterix.
+Viewing the surveys html source code, again, only q1 and q3 are displayed.
q2 and q4 are nowhere to be seen.

DATABASE RESULTS (mysql):
+If I fill out both displayed input fields, their data will get stored in the DB of course, but the two questions that are not displayed will get stored as NULL
+If I fill out only the mandatory question (q3) and leave q1 blank, in the DB q1 will be "" <--- without the quotes, just an empty cell, but Not null.

SURVEY:
You can import the survey that I used by saving the following url as a .lss file:
http://sharetext.org/D4H/p

FOLLOW UP:
@Shnoulle I can see the links you provided above are for the live surveys, but can you provide a link to the actual survey file, so I can import it into my system to test?

lemeur

lemeur

2011-02-12 10:29

developer   ~14172

@shnoulle, I can reproduce the pb with the http://sharetext.org/D4H/p survey and very latest development tree (rev 9781).

c_schmitz

c_schmitz

2011-03-11 13:20

administrator   ~14402

Last edited: 2011-03-11 13:24

The option 'Always hide this question' is designed to work that way that no output is generated. I agree that for someone who wants to manipulate a value by JS this is inconvenient. On the other had a simple CSS statement will hide a complete question too, if needed.

So the option 'Always hide this question' is currently only intended onyl to be used if you want to prefill fields by URL. I agree also that it should be extended later so it can be switched to two settings (one to completely leave it out right now and one to hide only) which might be less confusing.

So, unless you say that prefilling by URL is not possible anymore, there is no bug here.

Mazi

Mazi

2011-03-12 13:01

updater   ~14418

I think we should improve this at 1.91 if possible because there are really lots of problems and questions when using this feature and when not displaying the HTML at all, it is nearly useless for most users.

c_schmitz

c_schmitz

2011-03-21 23:10

administrator   ~14504

Sure, but anyway, it is no bug.

Issue History

Date Modified Username Field Change
2011-01-29 00:24 timbee New Issue
2011-01-29 00:24 timbee Status new => assigned
2011-01-29 00:24 timbee Assigned To => lemeur
2011-01-29 19:06 lemeur Note Added: 14000
2011-01-29 19:06 lemeur Status assigned => confirmed
2011-01-31 14:49 DenisChenu Note Added: 14003
2011-01-31 14:50 DenisChenu Note Edited: 14003
2011-01-31 14:50 DenisChenu File Added: limesurvey_survey_59534.lss
2011-01-31 14:55 DenisChenu Note Edited: 14003
2011-01-31 14:56 DenisChenu File Deleted: limesurvey_survey_59534.lss
2011-01-31 14:56 DenisChenu File Added: limesurvey_survey_59534.lss
2011-01-31 14:59 lemeur Note Added: 14004
2011-01-31 15:12 DenisChenu Note Added: 14005
2011-01-31 15:15 DenisChenu Note Edited: 14005
2011-01-31 15:17 DenisChenu Note Edited: 14005
2011-01-31 15:30 DenisChenu Note Edited: 14005
2011-01-31 15:31 DenisChenu Note Edited: 14005
2011-01-31 15:34 DenisChenu Note Edited: 14005
2011-01-31 15:43 DenisChenu Note Edited: 14005
2011-01-31 15:48 lemeur Note Added: 14006
2011-01-31 15:55 DenisChenu Note Added: 14007
2011-01-31 16:06 lemeur Note Added: 14008
2011-01-31 16:11 DenisChenu Note Added: 14009
2011-01-31 16:11 DenisChenu Note Edited: 14009
2011-01-31 16:12 DenisChenu Note Edited: 14009
2011-01-31 16:12 DenisChenu Note Edited: 14009
2011-01-31 16:18 lemeur Note Added: 14010
2011-01-31 16:22 Mazi Note Added: 14011
2011-01-31 19:53 timbee Note Added: 14021
2011-02-01 14:36 DenisChenu Note Added: 14028
2011-02-01 16:15 mdekker Target Version => 1.91RC4
2011-02-01 17:36 timbee Note Added: 14030
2011-02-01 17:58 DenisChenu Note Added: 14033
2011-02-01 18:23 timbee Note Added: 14034
2011-02-02 00:07 timbee Note Added: 14035
2011-02-12 10:29 lemeur Note Added: 14172
2011-02-15 21:21 c_schmitz Assigned To lemeur => c_schmitz
2011-02-15 21:21 c_schmitz Status confirmed => assigned
2011-02-17 11:17 jacopo Issue Monitored: jacopo
2011-03-11 13:20 c_schmitz Note Added: 14402
2011-03-11 13:24 c_schmitz Note Edited: 14402
2011-03-11 13:24 c_schmitz Status assigned => feedback
2011-03-12 13:01 Mazi Note Added: 14418
2011-03-21 23:10 c_schmitz Note Added: 14504
2011-03-21 23:10 c_schmitz Status feedback => closed
2011-03-21 23:10 c_schmitz Resolution open => not fixable