Welcome, Guest
Username: Password: Remember me

TOPIC: Prevent accidentially closing the survey

Prevent accidentially closing the survey 6 months 1 week ago #107456

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6435
  • Thank you received: 840
  • Karma: 249
The administrator has disabled public write access.

Prevent accidentially closing the survey 6 months 1 week ago #107466

  • david2013
  • david2013's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 26
  • Thank you received: 3
  • 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.
The administrator has disabled public write access.

Prevent accidentially closing the survey 6 months 1 week ago #107467

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6435
  • Thank you received: 840
  • Karma: 249
No .... stop at first error, but don't stop at actual page.
The administrator has disabled public write access.

Prevent accidentially closing the survey 5 months 4 weeks ago #107913

  • jonsen
  • jonsen's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 73
  • Thank you received: 6
  • 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
The administrator has disabled public write access.

Prevent accidentially closing the survey 5 months 4 weeks ago #107915

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6435
  • Thank you received: 840
  • Karma: 249
Hi,

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

;)
The administrator has disabled public write access.
The following user(s) said Thank You: jonsen

Prevent accidentially closing the survey 5 months 4 weeks ago #107916

  • jonsen
  • jonsen's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 73
  • Thank you received: 6
  • Karma: 1
I edited your post in the wiki...

Thanks and see you!
The administrator has disabled public write access.

Prevent accidentially closing the survey 5 months 4 weeks ago #107917

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6435
  • Thank you received: 840
  • Karma: 249
And maybe it's best to use something like this:
if(!$('#submitted').length || $('.button,[name='move']').length)

Think it's best (have to test ...)
The administrator has disabled public write access.

Prevent accidentially closing the survey 5 months 3 weeks ago #107997

  • jonsen
  • jonsen's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 73
  • Thank you received: 6
  • Karma: 1
DenisChenu wrote:
$('.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...
The administrator has disabled public write access.

Prevent accidentially closing the survey 3 months 1 day ago #111049

  • LS_SR
  • LS_SR's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 20
  • Thank you received: 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.
The administrator has disabled public write access.

Prevent accidentially closing the survey 3 months 1 day ago #111050

  • jonsen
  • jonsen's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 73
  • Thank you received: 6
  • 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
The administrator has disabled public write access.
The following user(s) said Thank You: LS_SR
Moderators: ITEd
Time to create page: 0.280 seconds
Donation Image