Welcome to the LimeSurvey Community Forum

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

Skipping a bunch of questions

More
12 years 6 months ago - 12 years 6 months ago #65636 by plbt5
Skipping a bunch of questions was created by plbt5
LS applies a question-oriented routing as opposed to an answer-oriented one. This is very convenient unless one wants to skip a bunch of questions: When e.g. one wants to jump from question 1 to the final question 125, all other questions in between need to carry the same identical condition :ohmy: , e.g. show only if Q1 equals 'yes'.
Is there a way around this? Or formulated differently: can you skip an arbitrary group of questions by only specifying the condition once?

I do apologize if this turns out to be a typical RTFM situation :blush: (which I did but couldn't find an answer)
Last edit: 12 years 6 months ago by plbt5. Reason: Changed title into better suiting one
The topic has been locked.
  • TMSWhite
  • TMSWhite's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
12 years 6 months ago #65637 by TMSWhite
Replied by TMSWhite on topic Skipping a bunch of questions
The challenge with that situation is coping with the "Previous" button. Although JavaScript could be written to tell the survey to conditionally move to the last question, it would be error-prone to write JavaScript to manage trying to jump back.

Personally, I think a better solution is to make it easy to associate the same conditions or relevance with a large number of questions. In LimeSurvey 1.92, all conditions, even the most complex, can be represented as Relevance , which is one database field per question. This would make it easy to copy that value for a large set of questions. In the past, I developed surveys in Excel, and could just use the pull-down feature in Excel to copy the Relevance to as many rows (questions) as needed. I'm hoping that LimeSurvey 1.92 can make it similarly easy to set and modify conditions/relevance.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
12 years 6 months ago #65680 by tpartner
Replied by tpartner on topic Skipping a bunch of questions
You can use JavaScript to jump to a page/group as long as it's not the last one in the survey (because for various reasons it needs to be accessable by a "Previous" button). Something like:
Code:
<script type="text/javascript" charset="utf-8">
 
  function jump(jumpStep) {
 
    $('#thisstep').val(jumpStep + 1);
    document.limesurvey.move.value = 'moveprev'; 
    $('#limesurvey').submit();
  }
 
  jump(125);
 
</script>

I have also accomplished jumping back by storing the originating survey step in persistent data and using he same code.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
12 years 6 months ago #65685 by dbrd
Replied by dbrd on topic Skipping a bunch of questions

plbt5 wrote: LS applies a question-oriented routing as opposed to an answer-oriented one. This is very convenient unless one wants to skip a bunch of questions: When e.g. one wants to jump from question 1 to the final question 125, all other questions in between need to carry the same identical condition :ohmy: , e.g. show only if Q1 equals 'yes'.
Is there a way around this? Or formulated differently: can you skip an arbitrary group of questions by only specifying the condition once?
)


Actually, skipping a bunch of questions by applying identical conditions is easy, and I use it all the time. The respondents in my surveys see the either the first half of the questions, or they are presented the second half of questions depending upon their answer to the first question: Location.

To skip to the last question based upon the answer to the first question, apply the desired condition to the second question. Then click the Copy Conditions icon on the same page and you will be able to check mark all the following questions you wish that to apply to. Click on the select all, then uncheck the last question. Click apply. Done, simple
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
12 years 5 months ago - 12 years 5 months ago #65858 by Mazi
Replied by Mazi on topic Skipping a bunch of questions

plbt5 wrote: I do apologize if this turns out to be a typical RTFM situation :blush: (which I did but couldn't find an answer)

Yes, a typical RTFM issue ;-)
Link 1
AND
Link 2

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
Last edit: 12 years 5 months ago by Mazi.
The topic has been locked.
More
11 years 3 months ago #89195 by frenyo
Replied by frenyo on topic Skipping a bunch of questions
Hmmm . . . .

How could I use the above code to have the "End URL" text element ultimately take the user to a specific group of questions? How do I know whet number a group should be referenced by? Where is the javascript code placed to be callable by the "End URL" and how does one call a js function there?

I would like to use this approach - the only one I found on the forum which *may* work for this - to be able to direct a user to pass the welcome screen and be returned to the first group of questions, when filling out the survey again, immediately after a previuos completion. Might there be a better (easier/more effective) way of accomplishing it?

Kind Regrads.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
11 years 3 months ago #89196 by tpartner
Replied by tpartner on topic Skipping a bunch of questions

How could I use the above code to have the "End URL" text element ultimately take the user to a specific group of questions?

This is not possible. This code is designed to be executed from within a question or group.

Where is the javascript code placed to be callable by the "End URL" and how does one call a js function there?

You cannot execute JavaScript with the end URL. If you want code executed on the end page, place it in the source of the end message.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
11 years 3 months ago #89198 by frenyo
Replied by frenyo on topic Skipping a bunch of questions
thank you. will try.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose