The LimeSurvey Fund-Raiser 2012 is complete. Thank you for donating a total of 25,000 USD!     List of donors »

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Multiple Question Validation problem

Multiple Question Validation problem 2 years 2 months ago #57659

  • AndrejL
  • AndrejL's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 28
  • 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: 2 years 2 months ago by AndrejL.
The administrator has disabled public write access.

Multiple Question Validation problem 2 years 2 months ago #57660

  • AndrejL
  • AndrejL's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 28
  • 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.
  • Page:
  • 1
Moderators: DenisChenu, ITEd
Time to create page: 0.329 seconds
Donation Image