Welcome, Guest
Username: Password: Remember me

TOPIC: Answer sourcing to question - hide space and get content in "others"

Answer sourcing to question - hide space and get content in "others" 2 years 7 months ago #74022

  • Newbeedu
  • Newbeedu's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 26
  • Karma: 0
Question 1 is a multiple choice with others box, having 22 options for multiple choice.

Selections from this question is part of question 2. I have used help from www.limesurvey.org/en/forum/design-issue...-showing-qno-answerq to make the options appear. However the problem is, I have not been able to get
1. what respondents writes when he selects others pulled to the page
2. to eliminate the huge space/gap between the two options selected (if the options are 1 and 18 in the list for previous question)

Please let me know if I should provide any further information to get further help.

Thanks,
The administrator has disabled public write access.

Re: Answer sourcing to question - hide space and get content in "others" 2 years 7 months ago #74027

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4206
  • Thank you received: 790
  • Karma: 360
Can you provide a screenshot and maybe a small sample survey?
Cheers,
Tony Partner

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

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: Answer sourcing to question - hide space and get content in "others" 2 years 7 months ago #74040

  • Newbeedu
  • Newbeedu's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 26
  • Karma: 0
Hi,

I have attached the screen shots and also a copy of the dummy survey where i need help.
Options Selected in Q1.jpg


Appears in Q 2 - In Next Page.jpg


File Attachment:

File Name: Sample Survey.lss
File Size: 43 KB
The administrator has disabled public write access.

Re: Answer sourcing to question - hide space and get content in "others" 2 years 7 months ago #74044

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4206
  • Thank you received: 790
  • Karma: 360
The extra spaces are caused by many empty <p> elements, perhaps inserted by the editor.

I would use a list element for the brands instead of <p> elements - see the screenshot. In which case the script should be:
<script type="text/javascript" charset="utf-8">
 
	$(document).ready(function() {
		$('li:contains("No answer")').hide();
	});
</script>

Here is a modified survey:

File Attachment:

File Name: limesurvey_survey_93714.lss
File Size: 40 KB


And the screenshot:
Capture_2012-02-09.PNG
Cheers,
Tony Partner

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

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
The following user(s) said Thank You: Newbeedu

Re: Answer sourcing to question - hide space and get content in "others" 2 years 7 months ago #74045

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
And here is how you could do it using the Expression Manager list() function in 1.92

File Attachment:

File Name: limesurvey_survey_93714.lss
File Size: 41 KB


Here is a screenshot of the running survey (in all-in-one mode):

74022-screenshot.jpg


The actual question text is this:

74022-questionview.jpg


The color coding (syntax highlighting), shows the equation. It may seem a little tricky since you want to only list the name of the product (the .question) if the product was actually selected. Thus the use of the if() function like this (if option 1 was checked, then it returns the question for option 1, otherwise it returns blank).
if(Q2_1, Q2_1.question, '')

The list() function creates a comma separated list of all of the non-blank answers.
The administrator has disabled public write access.
The following user(s) said Thank You: Newbeedu

Re: Answer sourcing to question - hide space and get content in "others" 2 years 7 months ago #74078

  • Newbeedu
  • Newbeedu's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 26
  • Karma: 0
Thanks a lot. Survey looks so much better now. However, "others" answer still does not appear in the list in next page.
Screenshots attached.

Others Does not Appear.jpg
The administrator has disabled public write access.

Re: Answer sourcing to question - hide space and get content in "others" 2 years 7 months ago #74080

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5325
  • Thank you received: 296
  • Karma: 249
Tom, can EM already trigger the "other" text?

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Re: Answer sourcing to question - hide space and get content in "others" 2 years 7 months ago #74118

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
Mazi, yes, as you can see from the post below (where I entered "Acer" for other), you can trigger and access the "other" text using EM.
The administrator has disabled public write access.

Re: Answer sourcing to question - hide space and get content in "others" 2 years 7 months ago #74128

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5325
  • Thank you received: 296
  • Karma: 249
TMSWhite wrote:
Mazi, yes, as you can see from the post below (where I entered "Acer" for other), you can trigger and access the "other" text using EM.
EM rocks!

:laugh:

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Re: Answer sourcing to question - hide space and get content in "others" 2 years 7 months ago #74137

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4206
  • Thank you received: 790
  • Karma: 360
However, "others" answer still does not appear in the list in next page.
The JavaScript solution for 1.91 works as expected for me. What LimeSurvey version and browser are you using?

Untitled-1_2012-02-10.gif
Cheers,
Tony Partner

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

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Last Edit: 2 years 7 months ago by tpartner.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.191 seconds
Donation Image