- Posts: 41
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
<script type="text/javascript" charset="utf-8"> $(document).ready(function () { var emailExp = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/; // Interrupt the submit function $('form#limesurvey').submit(function () { // Override the built-in "disable navigation buttons" feature $('#moveprevbtn, #movenextbtn, #movesubmitbtn').attr('disabled', ''); var email = $("#answer31822X121X22232"); var flag = emailExp.test(email.val()); if (flag || email == '') { return true; } else { alert ('The email is invalid!'); return false; } }); }); </script>
$('form#limesurvey').submit(function () {
$('#movenextbtn, #movesubmitbtn').bind('click', function () {
is_empty(QCODE_EMAIL.NAOK) or regexMatch("/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/",QCODE_EMAIL.NAOK)
(is_int(QCODE_SQ001comment.NAOK) or is_empty(QCODE_SQ001comment.NAOK)) and (is_int(QCODE_SQ002comment.NAOK) or is_empty(QCODE_SQ002comment.NAOK)) and (is_int(QCODE_SQ003comment.NAOK) or is_empty(QCODE_SQ003comment.NAOK)) and (is_int(QCODE_othercomment.NAOK) or is_empty(QCODE_othercomment.NAOK)) and sum(QCODE_SQ001comment.NAOK,QCODE_SQ002comment.NAOK,QCODE_SQ003comment.NAOK,QCODE_othercomment.NAOK)==100