Question
I have a WebForm based classification ssytem. Each of the classifications has a topic that does a search for topics with that classification and offer the user a form to create a new topic that will be of that classification.
The form looks like:
<FORM action="%SCRIPTURL%/edit/%WEB%/">
| *Create a new Topic:* ||
| Topic Name (as wikiword): | <INPUT type="text" name="topic" size="32"> |
| Summary of Topic: | <INPUT type="text" name="summary" size="45" |
<INPUT type="hidden" name="class" value="%INCLUDINGTOPIC%">
<INPUT type="submit" value="Create">
</FORM>
The "summary", "class" and "topic" (i.e. topic name) are the parameters.
In WebTopicEditTemplate there is the body of the new topic plus the classification form.
%META:FIELD{name="TopicClassification" title="TopicClassification" value=" %URLPARAM{ class }% " }%
My question is about the quotes and escaped quotes for the URLPARAM.
I don't seem to be able to get it right. Can someone help my confusion please.
Environment
--
AntonAylward - 04 Nov 2004
Answer
You do not need the use URLPARAM for form fields; URLPARAM can only be used in the topic text. Simply pass the name and value of the field to the edit script, e.g. in your case:
<input type="hidden" name="TopicClassification" value="%INCLUDINGTOPIC%" />
TWiki will take care of the filling the form field.
--
PeterThoeny - 04 Nov 2004