Check out the LimeSurvey source code on GitHub!

Exit survey on Welcome page

More
5 years 7 months ago #63219 by pchristoph
Hi,

We are using Version 1.87+ Build 8518

We want to give users to opportunity to exit a survey when it pops up on the website, e.g. they can decide whether they want to take part or not on the welcome page of the survey. If have worked with JavaScript and come up with this script:
function endSurvey() {
 
$('input:hidden[name*="mandatory"]').val("");
  document.limesurvey.move.value = 'movesubmit';
  document.limesurvey.submit();
}

This first clears all mandatory fields in order to avoid limesurvey asking the user to fill in the questions before submitting it. This works beautifully but only once you have started the survey. I want to give users the opportunity to exit the survey directly on the welcome page.

I have tried using the {CLEARALL} keyword but this only deletes all answers but does not end the survey e.g. the field Completed? in the DB is still set to 'N'

Any ideas?

Thanks,
Christoph

Please Log in to join the conversation.

More
5 years 7 months ago #63231 by jelo

pchristoph wrote: Hi,
I have tried using the {CLEARALL} keyword but this only deletes all answers but does not end the survey e.g. the field Completed? in the DB is still set to 'N'

A completed survey cannot be a survey which is quitted at the welcome page.

You could perhaps suppress the welcome page ( Show welcome screen? = no )
and recreate the welcome message on the first question page with the explicit question "Do you want to participate ..". With Yes No question you could then use quotas to exit the survey if no is pressed. With the quota URL you could then redirect the respondent to another site.

Please Log in to join the conversation.

More
5 years 7 months ago #63233 by pchristoph
jelo,

As always thanks for the quick and detailed reply. Where can I set the show welcome screen? = no? I have not found it in the survey settings. Can this be due to my older version?

Thanks,
Christoph

Please Log in to join the conversation.

More
5 years 7 months ago #63237 by holch
Yes, in the older versions you can just omit the welcome screen by a work around (I think a Javascript redirect). In the newest version there is an option in "general settings" >> "Presentation & Navigation" >> "Show welcome screen?"

However, what we usually do is to create a "recruitment layer" on the website, which is totally independent of Limesurvey. There we give them the chance to participate. Only when they click on "Yes" the survey will open in another window. In case of "no" we set a cookie for the survey not to appear anymore in future.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
5 years 7 months ago #63342 by pchristoph
holch,

Thanks for this simple tip, it works like charm!

Regards,
Christoph

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form