in reply to CGI form Not Showing Up.
This code would replace the code for the form you posted. Basicly I'm putting the results of the functions that generate the form elements into variables and interpolating them into a here document. It makes the here document easier to read and it groups your form elements together to make then easier to edit/update. John#build form elements my $openform = start_form( { -action => "action_dbi.cgi", -enctype => "application/x-www-form-urlen +coded", -method => "post" } ); my $chk_question = checkbox_group(-name=>'question', -values=>['yes','no'], -default=>['yes']); my $cmd_submit = input( { -type => "submit", -value => "submit"} ); #print form print <<End_of_Form; $openform h1( strong( "Does this format look correct?" ) ) $chk_question p( " " ) p( $cmd_submit) end_form() End_of_Form
|
|---|