• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item4158: TWikiRegistration does not pass on multiple checkbox element values to UserForm.

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Normal Closed   minor 4.2.0

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

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

ItemTemplate
Summary TWikiRegistration does not pass on multiple checkbox element values to UserForm.
ReportedBy TWiki:Main.LynnwoodBrown
Codebase 4.1.2
SVN Range TWiki-4.1.2, Fri, 18 May 2007, build 13796
AppliesTo Engine
Component

Priority Normal
CurrentState Closed
WaitingFor

Checkins TWikirev:14011
TargetRelease minor
ReleasedIn 4.2.0
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2008-01-22 - KennethLavrsen
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback