[ic] saving multiple values userdb.mail_list

Andrew Waegel andrew@benevolent-tech.com
Thu, 18 Jan 2001 10:00:08 -0800


>> If I try to submit multiple values for mail_list (using checkboxes or
>> <select multiple>), it only records the first value in userdb.
>
> No, I don't believe this is true. It actually records
> value1\0value2\0\value3.
>
> The answer is to filter that variable, either by setting
> an input filter in the page or by:
>
>     Filter  mail_list  null_to_space
>
> in catalog.cfg.

Interesting. The multiple values were definately not being inserted into 
mysql, but i'l bet somewhere else it was whacking off the value after the 
first null.

I solved this problem with the first mv_click of my very own:

<input type=hidden name=mv_click value=Setprefs>
[set Setprefs]
[perl]
$CGI->{mail_list} = join(' ',@{$CGI_array->{'mail_list'}});
[/perl]
[/set]

...which massages mail_list into the form I want before it's saved to 
userdb.

               >>> Andrew Waegel Benevolent Technologies <<<
               >>> 510 527 6116  asw@benevolent-tech.com <<<