if($form->submitted && $form->validate){ my $field = $form->fields; if($form->submitted eq 'Proceed to Next Household'){ $self->_record_call_results($field); $www_hh_form = $form->render(header => 1); # $www_hh_form = $form->confirm(header => 1); # $www_hh_form .= "
" . Dumper(\$field) . "
"; return $www_hh_form; } elsif($form->submitted eq 'Save Results') { $self->_record_call_results($field); # $www_hh_form = $form->confirm(header => 1); $www_hh_form = $self->_render_dashboard(); $www_hh_form .= "
" . Dumper(\$field) . "
"; return $www_hh_form; } elsif($form->submitted eq 'Reset this Household') { my $record_count = $self->_reset_hh_call_results($field); $www_hh_form = $form->render(header => 1); return $www_hh_form; } else { print STDERR "Form invoked with illegal submit button from IP: \n"; die "Form invoked with illegal submit button from IP: \n"; } } else { print STDERR "OK, we'll render form for first time for this household.\n"; $www_hh_form = $form->render(header => 1); return $www_hh_form; }