Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: Multiple Question Validation problem

Multiple Question Validation problem 5 years 9 months ago #57659

  • AndrejL
  • AndrejL's Avatar
  • Offline
  • Junior Lime
  • Posts: 39
  • Karma: 1
Hi!

I have a simple list radio question with other option included.

I would like to add validation for other filed which is btw numerical only.

With help from workarounds page I wrote this code in the question following the question I want to validate.
<script type="text/javascript" charset="utf-8">
 
if ("{INSERTANS:sidXgidXqidother}" > 100) {
 
alert("Number must be less than 100!");
document.limesurvey.move.value = "moveprev";
document.limesurvey.submit();
}
 
</script>

If condition is met the alert is displayed but it doesn't move back one question.

Survey is set to to "Q by Q", and back button is enabled. Filter for XSS is off.

Thanks,

Andrej
Last Edit: 5 years 9 months ago by AndrejL.
The administrator has disabled public write access.

Multiple Question Validation problem 5 years 9 months ago #57660

  • AndrejL
  • AndrejL's Avatar
  • Offline
  • Junior Lime
  • Posts: 39
  • Karma: 1
Sorry I accidentally posted this in 'Installation & update issues section' :blush:

Admin, could you move it to 'Can I do this with LimeSurvey', please.

Thank you
The administrator has disabled public write access.
Time to create page: 0.191 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form