Welcome to the LimeSurvey Community Forum

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

End Survey Now button/option

  • exlibris139
  • exlibris139's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 2 months ago #116046 by exlibris139
End Survey Now button/option was created by exlibris139
I've just started using Limesurvey and I'd like to implement the ability for my participants to end the survey they are taking without completing all questions - for example on Q15 of 30 be able to press an "End Now" button and have their 15 completed answers recorded and all remaining ones left blank.

I do need all questions to be mandatory, as this is almost like an emergency feature - all answers are needed but some are preferable to none if participants run out of time or something.

Is this something that can be done? At worst I can ask participants to simply close their browser tab, as I'm assuming that answers are recorded one by one and not in batches, but I'd like to avoid this.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 2 months ago #116047 by holch
Replied by holch on topic End Survey Now button/option
All responses are recorded up to the page were they leave (these questions are not recorded). The only thing is, that they are marked as not completed in the database.

The only thing that I see at the moment is to add one question on each page of Q15-30 that says "I want to quit the survey" and then you need to set all subsequent questions to hidden via conditions.

Probably best is to create a hidden equation question where you can write in that the survey should be closed and then the conditions or relevance equations only need to look at this hidden equation.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 2 months ago #116048 by tpartner
Replied by tpartner on topic End Survey Now button/option
An approach I have used is similar to holch's.

In each group I place a hidden check-box question - "Continue". This is checked by JavaScript when the page loads and the next group is shown conditionally on it being checked.

Then I use JavaScript to insert a "Quit" button that when clicked:
- Pops up a confirmation request
- If confirmed, unchecks the hidden question and clicks the "Next" button

Then the page is submitted and all subsequent groups are hidden, ending the survey.

Of course, all mandatory questions on a given page must be answered before "Quit" works.


.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • exlibris139
  • exlibris139's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 2 months ago #116054 by exlibris139
Replied by exlibris139 on topic End Survey Now button/option
Thank you both for the suggestions. For the sake of time, I've gone for the quick and dirty workaround of adding a line of Javascript to the template displaying a "Click here to end" link which closes the tab, but I will be playing around with this more in the future.
The topic has been locked.
More
8 years 8 months ago #122842 by fvanderstarre
Replied by fvanderstarre on topic End Survey Now button/option
Would you be so kind as to share this line of Javascript with us? :)
Thx!
The topic has been locked.
  • exlibris139
  • exlibris139's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 8 months ago #122844 by exlibris139
Replied by exlibris139 on topic End Survey Now button/option
Hi fvanderstarre, unfortunately I have since lost the template I originally used this in, but I was able to find this bookmarked in my notes for that project. I'm fairly sure I simply used window.close(), which I would have put into the endpage.pstpl, but that link has a few alternatives depending on what works for you.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose