PSA: Custom javascript mandatory logic reandomly breaking

3 years 9 months ago #112140 by Bigred01
Bigred01 created the topic: PSA: Custom javascript mandatory logic reandomly breaking
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.

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!