Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: Prevent accidentially closing the survey

Prevent accidentially closing the survey 10 Monate 2 Wochen her #107456

  • DenisChenu
  • DenisChenus Avatar
  • OFFLINE
  • Moderator Lime
  • Beiträge: 6884
  • Dank erhalten: 924
  • Karma: 275
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Prevent accidentially closing the survey 10 Monate 2 Wochen her #107466

  • david2013
  • david2013s Avatar
  • OFFLINE
  • Junior Lime
  • Beiträge: 39
  • Dank erhalten: 4
  • Karma: 2
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.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Prevent accidentially closing the survey 10 Monate 2 Wochen her #107467

  • DenisChenu
  • DenisChenus Avatar
  • OFFLINE
  • Moderator Lime
  • Beiträge: 6884
  • Dank erhalten: 924
  • Karma: 275
No .... stop at first error, but don't stop at actual page.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Prevent accidentially closing the survey 10 Monate 2 Tage her #107913

  • jonsen
  • jonsens Avatar
  • OFFLINE
  • Senior Lime
  • Beiträge: 79
  • Dank erhalten: 7
  • Karma: 1
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
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Prevent accidentially closing the survey 10 Monate 2 Tage her #107915

  • DenisChenu
  • DenisChenus Avatar
  • OFFLINE
  • Moderator Lime
  • Beiträge: 6884
  • Dank erhalten: 924
  • Karma: 275
Hi,

Plese fill free to update our wiki :
manual.limesurvey.org/Workarounds:_Surve...y_closing_the_survey

;)
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Folgende Benutzer bedankten sich: jonsen

Prevent accidentially closing the survey 10 Monate 2 Tage her #107916

  • jonsen
  • jonsens Avatar
  • OFFLINE
  • Senior Lime
  • Beiträge: 79
  • Dank erhalten: 7
  • Karma: 1
I edited your post in the wiki...

Thanks and see you!
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Prevent accidentially closing the survey 10 Monate 2 Tage her #107917

  • DenisChenu
  • DenisChenus Avatar
  • OFFLINE
  • Moderator Lime
  • Beiträge: 6884
  • Dank erhalten: 924
  • Karma: 275
And maybe it's best to use something like this:
if(!$('#submitted').length || $('.button,[name='move']').length)

Think it's best (have to test ...)
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Prevent accidentially closing the survey 9 Monate 4 Wochen her #107997

  • jonsen
  • jonsens Avatar
  • OFFLINE
  • Senior Lime
  • Beiträge: 79
  • Dank erhalten: 7
  • Karma: 1
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...
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Prevent accidentially closing the survey 7 Monate 5 Tage her #111049

  • LS_SR
  • LS_SRs Avatar
  • OFFLINE
  • Junior Lime
  • Beiträge: 21
  • Dank erhalten: 1
  • Karma: 0
Where can I change the alert text and the alert-button text?

I tryed the program Poedit, but that's not working.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Prevent accidentially closing the survey 7 Monate 5 Tage her #111050

  • jonsen
  • jonsens Avatar
  • OFFLINE
  • Senior Lime
  • Beiträge: 79
  • Dank erhalten: 7
  • Karma: 1
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
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Folgende Benutzer bedankten sich: LS_SR
Moderatoren: ITEd
Ladezeit der Seite: 0.316 Sekunden
Donation Image