[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cgiapp] I have a problem with "form"


-- Robert <suppressed> wrote
(on Friday, 13 August 2004, 09:41 AM -0400):
> my form code:
> 
> <form name="frm" action="index.pl" method="post">
>         <input type="hidden" name="rm" value="insert">
>         <table summary="holds the input ticket form">
>             <tr>
>             <td class="rtAlign">Remedy#:</td>
>             <td><input type="text" name="remedy_ticket" value="<TMPL_VAR
> NAME=REMEDY_TICKET>" /></td>
>             </tr>
>             <tr>
>             <td class="rtAlign">Received:</td>
>             <td><input type="text" name="date_received" value="<TMPL_VAR
> NAME=DATE_RECEIVED>" />&nbsp;format: 08-JUN-04</td>
>             </tr>
>             <tr>
>             <td class="rtAlign">Customer:</td>
>             <td><input type="text" name="customer_name" value="<TMPL_VAR
> NAME=CUSTOMER_NAME>" /></td>
>             </tr>
>             <tr>
>             <td class="rtAlign">Phone#:</td>
>             <td><input type="text" name="phone_number" value="<TMPL_VAR
> NAME=PHONE_NUMBER>" />&nbsp;format: 305-292-8814</td>
>             </tr>
>             <tr>
>             <td class="rtAlign">Email:</td>
>             <td><input type="text" "email_address" value="<TMPL_VAR
> NAME=EMAIL_ADDRESS>" /></td>
>             </tr>
>             <tr>
>             <td>&nbsp;</td>
>             <td><button type="submit" value="Submit
> Form">Submit</button>&nbsp;&nbsp;<button type="reset">Reset</button></td>
>             </tr>
>         </table>
>       </form>
> 
> My C-A code:
> 
> sub insert_ticket {
>     my $self = shift;
>     my $q = $self->query();
> 
>     # form information
>     my $remedy_number = $q->param('REMEDY_NUMBER');
>     my $date_received = $q->param('DATE_RECEIVED');
>     my $customer_name = $q->param('CUSTOMER_NAME');
>     my $phone_number = $q->param('PHONE_NUMBER');
>     my $email_address = $q->param('EMAIL_ADDRESS');

The element name you're requesting doesn't match the case of the element
name in the form. For example, in the form, you have an input element
named 'date_received', but you're trying to grab one named
'DATE_RECEIVED' with the param() method from CGI.pm. (CGI::Application's
param() method is case-insenstive, but CGI.pm's is not, as HTML element
names are case-insensitive.)

-- 
Matthew Weier O'Phinney
http://weierophinney.net/matthew/

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.