Item9258: Customized Main.UserForm doesn't obey select+multi type

pencil
Priority: Normal
Current State: No Action Required
Released In: 1.1.0
Target Release: minor
Applies To: Engine
Component:
Branches:
Reported By: TjMaciak
Waiting For:
Last Change By: CrawfordCurrie
I was talking to Lavr in #foswiki this morning and he said he wasn't aware of anyone working on this problem so I should file a bug report.

We have made a customized UserForm and customized UserRegistration to allow a multiple select input. It appears as if this does not work for the user registration process and should be looked into.

It is fairly easy to duplicate this problem by following these steps:

cp System/UserForm.txt Main/UserForm.txt

cp System/UserRegistration.txt Main/UserRegistration.txt

edit UserForm.txt to make the Country type select+multi instead of text

edit UserRegistration form to add multiple="" to the <select> .. </select> statement for country.

Load the Main.UserRegistration topic - you should be able to multi-select country Select Multiple Countries for the user - then submit

Look at that new users topic in Main .... the country only shows the first select country of the multi-part select.

I changed the UserRegistration from post to get and verified that the html does indeed send multiple params for the country input so it seems like the problem lies in the way the UserRegistration / UserForm get processed/parsed.

I will be happy to upload the UserForm.txt and UserRegistration.txt later this weekend so that it is quicker to reproduce.

I will also be adding some debugging messages later this weekend to see if I might be able to figure something out as well.

Other NOTES:
Lavr>   Are you using registration approvals? Ie the user has to confirm with a code he receives by email?
   <Lavr>   The code file to look at in Foswiki 1.0.9 and probably most earlier versions is lib/Foswiki/UI/Register.pm
   <Lavr>   And at first glance I see # deal with multivalue fields like checkboxen
   <TJ_ADOG>   Lavr: on productionj yes - they have to approve
   <TJ_ADOG>   on test: no they dont because I dont have access to smtp server on my test machine
   <Lavr>   so the coder that did it expected it to work
   <TJ_ADOG>   ok I will be glad to do some debugging later this weekend :)
   <TJ_ADOG>   almost ready to submit my code
   <TJ_ADOG>   oops my task
   <Lavr>   There is an extra thing that can go wrong when you have validate turned on because then all the values are stored in a file in working until the user comes back and validates
   <Lavr>   But if it already fails on your test system with the validation turned off then it helps narrowing in where the problem can happen in the code
   <TJ_ADOG>   well this problem is failing on the test system without the validation
   <Lavr>   Which version of Foswiki are you on?
   <TJ_ADOG>   ok so im ready to submit my task
   <TJ_ADOG>   I just found that out :)
   <TJ_ADOG>   Foswiki-1.0.6, Sun, 21 Jun 2009, build 4272
   <Lavr>   OK.

-- TjMaciak - 03 Jul 2010

The steps you describe are insufficient to make the country multi-select. You have to edit the actual select statement in the HTML and enable the MULTIPLE option - see http://www.htmlhelp.com/reference/html40/forms/select.html

No action.

-- CrawfordCurrie - 08 Sep 2010

ItemTemplate edit

Summary Customized UserForm doesn't obey select+multi type
ReportedBy TjMaciak
Codebase 1.0.6
SVN Range
AppliesTo Engine
Component
Priority Normal
CurrentState No Action Required
WaitingFor
Checkins
TargetRelease minor
ReleasedIn 1.1.0
Topic revision: r3 - 08 Sep 2010, CrawfordCurrie
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy