Welcome, Guest
Username: Password: Remember me

TOPIC: Multiple Question Validation problem

Multiple Question Validation problem 3 years 4 months ago #57659

  • AndrejL
  • AndrejL's Avatar
  • OFFLINE
  • Bronze Donor
  • Posts: 35
  • 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: 3 years 4 months ago by AndrejL.
The administrator has disabled public write access.

Multiple Question Validation problem 3 years 4 months ago #57660

  • AndrejL
  • AndrejL's Avatar
  • OFFLINE
  • Bronze Donor
  • Posts: 35
  • 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.
Moderators: ITEd
Time to create page: 0.157 seconds
Donation Image