Our survey includes a few multirow/multicolumn matrix tables with constant sum. We've been able to write some custom javascript so that they are only allowed to continue if the totals in all displayed columns are 100% or above. (note: <100 should not be possible and is prevented with an error message etc).
We had to write the custom code due to our particular survey having to account for a total of 100 or above and not just 100%. It's about usage of products and some are used in combination hence >100%
the script works flawlessly if the respondent clicks on the "next" button on the bottom of the page, however, I have just noticed that it completely skips the custom script validation and jumps to the next question if I simply press Enter. The respondent could have answered the question correctly or columns may not add up to 100% or more. - Which is obvisouly not my intention.
My question now, is there possibly some code or workaround that prevents a respondent to use enter to skip to the next page/question? At least for the questions where we have this particular script running?
Thanks!
Any help or pointers would be much appreciated.
Best answer by TomG
View original