Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

BUG - Checkbox Fields not adding all data

Quote Reply
BUG - Checkbox Fields not adding all data
Hi Alex,

I'm using checkbox fields and have discovered that when I check several items, whether I'm going through Add a Link or Modify a Link, that the success page only shows that one item has been added AND when I look at the data by calling up modify record again, the data isn't there at all. The data does show up when I view the record, but only the first checked box is there. None of the others are.

I checked the table to see if all the data is being written to the table and only the first checked box is being written. All the others are getting lost.

This is also the case when editing through maintain.cgi

It seems like the problem might have to do with the coding in cgi_to_hash, but I don't understand what this subroutine does.

sub cgi_to_hash {
# --------------------------------------------------------
# Converts a CGI object to a hash ref.
#
my $in = shift;
my %rec = ();
foreach ($in->param) { $rec{$_} = join "\0", $in->param($_); }
return \%rec;
}


I look forward to this fix. I'm stuck till I can get this worked out.

Thanks,

Kyle
Quote Reply
Re: BUG - Checkbox Fields not adding all data In reply to
Here's a little more info.

When I actually modify the record using a multi modify (assuming 2 or more records are returned from the search), it still only writes the first checked box, but when I bring it up under modify or modify multiple, that one box is checked.

I tried to modify the record under modify multiple using the id to bring up just that record (i.e the search returned only 1 record) and made the modification, but afterwards it didn't show up under modify or modify multiple(returning 2 or more records).

I'll keep looking.

Kyle

Quote Reply
Re: BUG - Checkbox Fields not adding all data In reply to
Sorry, hit reload and it posted again.

[This message has been edited by klangan (edited January 17, 2000).]