##
sub save_form {
my $self = shift;
# Get CGI query object
my $q = $self->query();
my $record = $q->param( 'text_field' );
open( FH, '>output.txt' ) || die "Can't open output.txt: $!";
print FH $record;
close ( FH );
# go back to the beginning
return $self->run_mode( 'mode1' );
}