When creating a new topic based on a form it is possible to specify default values for form fields. Here is the example
FeatureEnhancementRequest form:
<form action="%SCRIPTURLPATH%/edit%SCRIPTSUFFIX%/%WEB%/">
New enhancement request topic: <br />
<input type="text" name="topic" size="32" />
<input type="hidden" name="TopicClassification" value="FeatureEnhancementRequest" />
<input type="hidden" name="onlywikiname" value="on">
<input type="submit" value="Create Topic">
</form>
The
TopicClassification is set to
FeatureEnhancementRequest by a hidden field. The latest Beta has a change in spec compared to the 01 Dec 2001 release. It requires to append
FLD to the name, i.e.
<input type="hidden" name="TopicClassificationFLD" value="FeatureEnhancementRequest" />
The reason for appending
FLD is to avoid name clashes with other cgi parameters. The dowside is that all existing topics that set a form field need to be updated. At work there are a lot of them...
Is this spec change OK or shall we revert back to the old spec? I recommend to revert back so that the new form system is compatible with existing topics. We could change the names of existing parameters (i.e.
text >
twikitext) to avoid accidental name clashes. Opinions?
--
PeterThoeny - 25 Aug 2001
I removed the FLD from the parameter names, thus reverting it back to the old spec. With this, existing topics that set form values by hidden fields do not need to be updated.
The downside is a possible name clash of form field names with TWiki internal cgi parameter names like
text,
parent,
rev,
cmd. TWiki internal parameter names with a possible clash should be changed. For now I changed the
parent parameter to
topicparent. Also
text should be changed to
topictext. However, this is too risky shortly before the release, so it is left as is for now.
--
PeterThoeny - 03 Sep 2001
I've updated documentation to reflect this change.
--
JohnTalintyre - 04 Sep 2001