Tags:
create new tag
, view all tags

Question

When using for creation of a topic a template containing multiple check boxes in the same category, not all of them are properly set.

The temmplate is designed like follows (original contents of *.txt file):


---++ Problem:

... Place your support request here ...

-- Main.TWikiGuest - 2012-05-28 
%META:FORM{name="Form"}% %META:FIELD{name="TopicTitle" title="TopicTitle" value=""}% %META:FIELD{name="Category" title="Category" value=""}%

The form specification looks like this:


---+ Support Request Form Definition

| *Name:*| *Type:* | *Size:* | *Values:* | *Tooltip message:* |
| TopicTitle | text | 64 | | Title |
| Category | checkbox | 5 | One, Two, Three, Four, Other | Category of the Issue |

When i start the edit using the URL
.../edit/<Web>?topic=<new topic>&Category=One&Category=Two&templatetopic=Template&topicparent=WebHome

which is generated by the following html-form:

<form name="new" action="%SCRIPTURLPATH%/edit/%WEB%">
| *Descriptive title*  | <input type="text" name="topic" size="60" /> |
| _&nbsp;Single line problem statement - see support database above for examples_  ||
| *Affected Areas* (optional)  | \
<input type="checkbox" name="Category" value="One">One&nbsp;\
<input type="checkbox" name="Category" value="Two">Two&nbsp;\
<input type="checkbox" name="Category" value="Three">Three&nbsp;\
<input type="checkbox" name="Category" value="Four">Four&nbsp;\
<input type="checkbox" name="Category" value="Other">Other\
\
<input type="hidden" name="templatetopic" value="Template" />\
<input type="hidden" name="topicparent" value="%BASETOPIC%" /> |
|   <input type="submit" value=" Create request and fill in details " />  ||
</form>

The result is that only the checkbox named 'One' is checked, but not the one titled 'Two' (as required).

  • TWiki version: 1 Dec 2001
  • Web server: Apache
  • Server OS: SunOS
  • Web browser: Netscape 4.78 (NT)
  • Client OS: Win NT 4 SP5

-- PetricFrank - 14 Jun 2002

Answer

Checkboxes are handled special because there are several items per field. The doc in TWikiForms has the details:

  • checkbox: namevalue=1, ex: ?ColourRed=1

In your case you need to specify ...CategoryOne=1&CategoryTwo=2&...

-- PeterThoeny - 12 Jul 2002

Topic revision: r2 - 2002-07-12 - PeterThoeny
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.