Well, instead of using a "warning" group, you could use JavaScript on page 1 to pop up a confirm message and populate a hidden question.
For example this script placed in the source of "
qHidden" in the attached sample survey will:
- Hide its parent question
- Interrupt the submit function
- If Q2 is found to be greater than Q1 a confirm box is popped up and the hidden question is given a value of "1"
- If "Cancel" is clicked, the submit function is aborted allowing the respondent to change their answers
Code:
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
// Identify some stuff
var qHiddenID = {QID};
var qHidden = $('#question'+qHiddenID);
var q1 = $('div.numeric:eq(0)'); // First numeric on the page
var q2 = $('div.numeric:eq(1)'); // Second numeric on the page
// Hide this question
$(qHidden).hide();
// Interrupt the Next/Submit function and validate each column
$('form#limesurvey').submit(function(){
// Override the built-in "disable navigation buttons" feature
$('#moveprevbtn, #movenextbtn, #movesubmitbtn').attr('disabled', '');
// Q2 value is greater than Q1 value
if ($('input.text', q2).val() > $('input.text', q1).val()) {
// Populate the hidden question
$('input.text', qHidden).val('1');
// Pop up a confirm message
if(confirm('Are you sure of your answer?')) {
return true;
}
else {
return false;
}
}
});
});
</script>