Hi,

I'm using HTML::Form extensively in a script that submits resumes to 
multiple forms on several sites. For the most part, it works just great. 
However sometimes, it does not fill out a select field (usually the kind 
that allows multiple selections) or a checkbox.

I always grab the form from the site, then check if a certain field exists. 
For example:

$key="pos";
$fillin="1830";
$inputexists=$form[$formnum]->find_input($key);
if(($inputexists ne "") and ($fillin ne "")){
                $form[$formnum]->value("$key","$fillin");
}
else{
        print"Did not find field $key on form.";
}

I do this for each field and then submit it. This works most of the time.

However I've come across one site that has several checkboxes. When I use 
the code above to select one, it doesn't seem to be saved in $form. When I 
do a dump:
$form[$formnum]->dump;

It shows something like this for that field:

   pos=<UNDEF>                     (checkbox) [*<UNDEF>|183]
   pos=<UNDEF>                     (checkbox) [*<UNDEF>|1813]
   pos=<UNDEF>                     (checkbox) [*<UNDEF>|192]
   pos=<UNDEF>                     (checkbox) [*<UNDEF>|174]
   pos=<UNDEF>                     (checkbox) [*<UNDEF>|1821]
   pos=<UNDEF>                     (checkbox) [*<UNDEF>|173]
   pos=<UNDEF>                     (checkbox) [*<UNDEF>|164]
   pos=<UNDEF>                     (checkbox) [*<UNDEF>|1830]

As you see 1830, the one I just selected above, is not selected here. If it 
was, it would look like this:
   pos=<UNDEF>                     (checkbox) [*<UNDEF>|*1830]

I've had the same happen on several sites that have select menus. I make a 
selection, I don't get any error message, however when I do a form dump it 
does not show as being selected.

Has anybody come across this problem before?

Thanks,
Paula Jakobs

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.330 / Virus Database: 184 - Release Date: 2/28/2002

Reply via email to