Survey new number type, if slider constraints are left blank, no constraints are applied.
This commit is contained in:
parent
9df02396b7
commit
724675c71c
3 changed files with 37 additions and 15 deletions
|
|
@ -532,8 +532,11 @@ sub recordResponses {
|
|||
|
||||
#Validate answers met question criteria
|
||||
if($question->{questionType} eq 'Number'){
|
||||
if($submittedAnswerResponse > $answer->{max} or $submittedAnswerResponse < $answer->{min} or
|
||||
$submittedAnswerResponse % $answer->{step} != 0){
|
||||
if($answer->{max} =~ /\d/ and $submittedAnswerResponse > $answer->{max}){
|
||||
next;
|
||||
}elsif($answer->{min} =~ /\d/ and $submittedAnswerResponse < $answer->{min}){
|
||||
next;
|
||||
}elsif($answer->{step} =~ /\d/ and $submittedAnswerResponse % $answer->{step} != 0){
|
||||
next;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue