conditions on subquestion

More
5 years 10 months ago #69820 by zahidansari
zahidansari replied the topic: conditions on subquestion
Well I thought my problem is over but its working fine when the question is not hidden. When I hide the question using advanced setting-> always hide this question. The array filter does not seems to work.

I checked the html source and it seems the question itself is not there in the html!!

Please Log in to join the conversation.

More
5 years 10 months ago - 5 years 10 months ago #69821 by zahidansari
zahidansari replied the topic: conditions on subquestion
Use

var qHiddenID = 14257;
$('#question'+14257+'').hide();



where qHiddenID is your question id

to hide your question
Last Edit: 5 years 10 months ago by zahidansari.

Please Log in to join the conversation.

More
5 years 10 months ago #69827 by tpartner
tpartner replied the topic: conditions on subquestion
You cannot hide questions with the advanced settings if you want to use JavaScript. You must use CSS or JavaScript to hide the question.

If you use the advanced setting, the question is never rendered on the page so cannot be manipulated with JavaScript.

In my opinion this "feature" causes too much confusion and should be dropped.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
5 years 10 months ago #69828 by zahidansari
zahidansari replied the topic: conditions on subquestion
Thanks dude....

Please Log in to join the conversation.

More
5 years 10 months ago #69837 by DenisChenu
DenisChenu replied the topic: conditions on subquestion

tpartner wrote: In my opinion this "feature" causes too much confusion and should be dropped.

Maybe, but:
If i want to fill the survey with url and don't want user can access this answer ?
If i want to fill the survey with Session ?
If i want to fill the survey with ajax ?


Just hide the answer item with css aren't good, because user can change it.

Maybe a "activate" or "read-only" option ? ( directly in HTML, can be removed with jquery).

Denis :)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
5 years 10 months ago #69842 by tpartner
tpartner replied the topic: conditions on subquestion
Then rename the setting so it doesn't cause so much confusion.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
5 years 10 months ago #69847 by Mazi
Mazi replied the topic: conditions on subquestion
I vote for extending this feature or overwork it.

Question: Why don't we just use a $('#question'XYZ'').hide(); instead of not generating the source code at all as it is currently done? Wouldn't this solution cover all our needs?


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
5 years 10 months ago - 5 years 10 months ago #69854 by DenisChenu
DenisChenu replied the topic: conditions on subquestion

Mazi wrote: I vote for extending this feature or overwork it.

Question: Why don't we just use a $('#question'XYZ'').hide(); instead of not generating the source code at all as it is currently done? Wouldn't this solution cover all our needs?


Just put a style="display:none" directly in HTML :).

I think it's best to have an extra item for all question:
"Extra class : "

With an {EXTRACLASS) in template.css
Then you can have
<div id="questionXXX" class="question-wrapper list-dropdown hide">
OR
<div id="questionXXX" class="question-wrapper list-dropdown tparner-workaround">
OR
<div id="questionXXX" class="question-wrapper list-dropdown important">

etc etc ...

Istarted to work with something like this for CI, but there are some old template incompatibility to resolve, and redo the work for Yii ;).

Denis

PS:

Maybe, but:
If i want to fill the survey with url and don't want user can access this answer ?
If i want to fill the survey with Session ?
If i want to fill the survey with ajax ?


Just hide the answer item with css aren't good, because user can change it.

It's just what i think, maybe it's not important :).

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Last Edit: 5 years 10 months ago by DenisChenu.

Please Log in to join the conversation.

More
5 years 10 months ago #69860 by tpartner
tpartner replied the topic: conditions on subquestion

I think it's best to have an extra item for all question:
"Extra class : "

Great idea. Joomla has this for all content, modules, etc. and I use it all the time. You can also add multiple classes.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
5 years 10 months ago #69884 by DenisChenu
DenisChenu replied the topic: conditions on subquestion

tpartner wrote:

I think it's best to have an extra item for all question:
"Extra class : "

Great idea. Joomla has this for all content, modules, etc. and I use it all the time. You can also add multiple classes.

Ho, yes :).
Just think of removing bad caracter from this "extraclass" :).

I look on Yii more next week and send a patch start :).

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now