We relaunched the TWiki.org project with an expanded TWiki charter, and we invite you to participate! The TWiki.org Code of Conduct agreement took effect on 27 Oct 2008. We ask existing twiki.org users to opt-in. You need to opt-in to participate in the Blog, Codev, Plugins and TWiki webs. -- PeterThoeny - 27 Oct 2008
You are here: TWiki> Support Web>Closed? >FormFieldsNotCompletelyFilled (12 Jul 2002, PeterThoeny)
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 - 22 Nov 2008 
%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 - 12 Jul 2002 - 06:38:09 - PeterThoeny
 
TWIKI.NET
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback