Adding checkbox form elements to TWiki.TWiki.Registration, I have discovered that only the first checked valued gets passed on to the user topic. Looking at the temporary file created in
data/RegistrationApprovals
, only the first checked value is getting passed to this file.
--
TWiki:Main/LynnwoodBrown - 29 May 2007
=== lib/TWiki/UI/Register.pm
==================================================================
--- lib/TWiki/UI/Register.pm (revision 16246)
+++ lib/TWiki/UI/Register.pm (local)
@@ -1283,7 +1283,8 @@
my $form = {};
$form->{required} = $2;
my $name = $3;
- my $value = $query->param($1.$2.$3);
+ my @values = $query->param($1.$2.$3);
+ my $value = join(',', @values); #deal with multivalue fields like checkboxen
$form->{name} = $name;
$form->{value} = $value;
if ( $name eq 'Password' ) {
--
SD
I've tested the above patch on two installations (ver. 4.1.2) and it works beautifully. I think it's ready to merge into core.
--
TWiki:Main.LynnwoodBrown - 01 Jun 2007
done
--
SvenDowideit - 01 Jun 2007