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 - 2026-02-20
%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" /> |
| _ Single line problem statement - see support database above for examples_ ||
| *Affected Areas* (optional) | \
<input type="checkbox" name="Category" value="One">One \
<input type="checkbox" name="Category" value="Two">Two \
<input type="checkbox" name="Category" value="Three">Three \
<input type="checkbox" name="Category" value="Four">Four \
<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