added Survey Number type. Text number entry that uses slider restrictions as constraints (server and client side). You can also use the arrow keys
to increment or decrement the number enter.
This commit is contained in:
parent
d47f5e1886
commit
9df02396b7
3 changed files with 38 additions and 4 deletions
|
|
@ -529,6 +529,15 @@ sub recordResponses {
|
|||
|
||||
# Proceed if we're satisfied that the submitted answer response is valid..
|
||||
if ( defined $submittedAnswerResponse && $submittedAnswerResponse =~ /\S/ ) {
|
||||
|
||||
#Validate answers met question criteria
|
||||
if($question->{questionType} eq 'Number'){
|
||||
if($submittedAnswerResponse > $answer->{max} or $submittedAnswerResponse < $answer->{min} or
|
||||
$submittedAnswerResponse % $answer->{step} != 0){
|
||||
next;
|
||||
}
|
||||
}
|
||||
|
||||
$aAnswered = 1;
|
||||
|
||||
# Now, decide what to record. For multi-choice questions, use recordedAnswer.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue