Prevent accidentially closing the survey

Mehr
3 Jahre 1 Monat her #107456 von DenisChenu
DenisChenu antwortete auf das Thema: Prevent accidentially closing the survey

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 .

Bitte Anmelden um der Konversation beizutretten.

Mehr
3 Jahre 1 Monat her #107466 von david2013
david2013 antwortete auf das Thema: Prevent accidentially closing the survey
It seems it will jump to next compulsory question. If I have 50 questions on 50 different pages. Each question are compulsory. Now I want to test skip logic around Q40. Currently, I have to answer all the questions up to Q40. Are we able to let question index jump to Q40 directly? It will save a lot of time when testing.

Bitte Anmelden um der Konversation beizutretten.

Mehr
3 Jahre 1 Monat her #107467 von DenisChenu
DenisChenu antwortete auf das Thema: Prevent accidentially closing the survey
No .... stop at first error, but don't stop at actual page.

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 .

Bitte Anmelden um der Konversation beizutretten.

Mehr
3 Jahre 4 Wochen her #107913 von jonsen
jonsen antwortete auf das Thema: Prevent accidentially closing the survey
Denis, thanks again for your solution! The reason why it did not work for me was that I changed the wrong template - d'oh! ;)

But I have one (I think quite important) addition to your code. In order for participants to be able to leave the survey without a message AFTER completing, I added another condition to the if-statement:
if(!$('#submitted').length && !$('#completed').length)
(It detects if the div with the id "completed" exists on that page.)

If you agree, can you please add it to your code?

Best
Jonsen

Bitte Anmelden um der Konversation beizutretten.

Mehr
3 Jahre 4 Wochen her #107915 von DenisChenu
DenisChenu antwortete auf das Thema: Prevent accidentially closing the survey

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 .
Folgende Benutzer bedankten sich: jonsen

Bitte Anmelden um der Konversation beizutretten.

Mehr
3 Jahre 4 Wochen her #107916 von jonsen
jonsen antwortete auf das Thema: Prevent accidentially closing the survey
I edited your post in the wiki...

Thanks and see you!

Bitte Anmelden um der Konversation beizutretten.

Mehr
3 Jahre 4 Wochen her #107917 von DenisChenu
DenisChenu antwortete auf das Thema: Prevent accidentially closing the survey
And maybe it's best to use something like this:
if(!$('#submitted').length || $('.button,[name='move']').length)

Think it's best (have to test ...)

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 .

Bitte Anmelden um der Konversation beizutretten.

Mehr
3 Jahre 3 Wochen her #107997 von jonsen
jonsen antwortete auf das Thema: Prevent accidentially closing the survey

DenisChenu schrieb:

$('.button,[name='move']').length


Yes, that's probably better than finding it out based on the <div>. I'm not sure if that then covers all cases...

Bitte Anmelden um der Konversation beizutretten.

Mehr
2 Jahre 10 Monate her #111049 von LS_SR
LS_SR antwortete auf das Thema: Prevent accidentially closing the survey
Where can I change the alert text and the alert-button text?

I tryed the program Poedit, but that's not working.

Bitte Anmelden um der Konversation beizutretten.

Mehr
2 Jahre 10 Monate her #111050 von jonsen
jonsen antwortete auf das Thema: Prevent accidentially closing the survey
Hi LS_SR,

you can adapt the German sentences in the code (at e.returnValue and return) BUT for Firefox and similar browsers, the text is built-in and you cannot change it. You would need to rewrite the function for Firefox. Also, you cannot change the text of the button of javascript's alert() function, so you would have to use a differnet solution to implement an alert with a custom button, like using jQuery's alert functions...

Best
jonsen
Folgende Benutzer bedankten sich: LS_SR

Bitte Anmelden um der Konversation beizutretten.

Mehr
2 Jahre 10 Monate her #111051 von LS_SR
LS_SR antwortete auf das Thema: Prevent accidentially closing the survey
Thanks for your fast answer.

Bitte Anmelden um der Konversation beizutretten.

Mehr
2 Jahre 4 Monate her #116036 von fanepic
fanepic antwortete auf das Thema: Prevent accidentially closing the survey
Thanks a lot for your Code.
Do you now how it's possible to make en exception for the languagechanger?

Cheers
Benny

Bitte Anmelden um der Konversation beizutretten.

Mehr
2 Jahre 4 Monate her #116038 von jonsen
jonsen antwortete auf das Thema: Prevent accidentially closing the survey
Hi fanepic,

please try to add ".changelang" to the jQuery "on" action by changing this:
$(document).on('click',".button,[name='move']", ...

to this:
$(document).on('click',".button,.changelang,[name='move']", ...

Please leave a quick comment if this works, otherwise I'll have a closer look.

Best
jonsen
Folgende Benutzer bedankten sich: fanepic

Bitte Anmelden um der Konversation beizutretten.

Mehr
2 Jahre 4 Monate her #116039 von jonsen
jonsen antwortete auf das Thema: Prevent accidentially closing the survey

Bitte Anmelden um der Konversation beizutretten.

Mehr
2 Jahre 4 Monate her #116042 von fanepic
fanepic antwortete auf das Thema: Prevent accidentially closing the survey
Thank you jonson works fine.

Do you also now how to make it Multilanguage like only show if it's German?

Regards
fanepic

Bitte Anmelden um der Konversation beizutretten.

Jetzt loslegen!

Melden Sie sich jetzt an, und erstellen Sie in wenigen Minuten Ihre erste Umfrage.

Account einrichten