[html-formfu] New user with simple question
Carl Franks
fireartist at gmail.com
Wed May 25 08:34:52 GMT 2011
Personally, for a simple example, I'd combine the 2 .cgi files into 1.
your simple.cgi is already doing `if ( $form->submitted ) {} else {}`
so the form may as well post to simple.cgi, and you can just get rid
of the 2nd .cgi
> Next, the initial CGI file: simple.cgi
> ======================
> 28 $form->indicator("textvar");
> 29 $form->process( $cgi_query );
As it is, lines 28 is redundant, and line 29 doesn't need the
$cgi_query parameter passed, as that .cgi is only being used to
display the form.
> And last, the processing CGI file: simple_get.cgi
> ======================
> 19 $query = new CGI;
> 25 #$form->action("/cgi-bin/simple_get.cgi");
> 26 #$form->method("post");
> 27 $form->indicator("submit");
> 28 $form->process();
Line 28 needs to be
$form->process( $query );
This will solve the initial problem.
Carl
More information about the HTML-FormFu
mailing list