my $html = $dashboard->_process_list_of_households();
print STDERR "We made it back to cgi script.\n";
if(defined($html)){
print STDERR "canvas_hh_screen.cgi says that \$html is: $html \n";
print $html;
} else {
print STDERR "\$html remains undefined for some reason.\n";
}
####
$html = $self->_render_online_household_form(\%hh_values);
if(defined($html)){
return $html;
# print $html;
} else {
die "\$html remains undefined after ->_render_online_household_form().\n";
}
####
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;
}