Welcome to the LimeSurvey Community Forum

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

PSA: Custom javascript mandatory logic reandomly breaking

  • Bigred01
  • Bigred01's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
9 years 6 months ago #112140 by Bigred01
Hey Everyone. I have had an issue with small number of random people using random browsers/browser versions getting past some of my custom javascript manadatory logic.

For these questions i usually run through a few if statements and if the question has not been answered properly i will throw up an alert and return false.

It seems that if someone tries to move forward multiple times and checks the option (if their browser offers it) to suppress all further alerts for the page they are on, the script will break at the alert and the form will submit.

I am now using preventDefault() on form submits when i run custom logic and i submit the form myself if the logic is true (which i should have been doing from the start :blush:).

This is just a heads-up for everyone who may have had or is having the same issue.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose