I created a subweb:
Friends/Vicki/Recipes
.
In that subweb, I put a template, NewRecipeTemplateStrict, a TWiki Form, NewRecipeForm, and an HTML form to create a new page:
<form name="new" action="%SCRIPTURLPATH%/edit%SCRIPTSUFFIX%/%INTURLENCODE{"%WEB%"}%">
<input type="hidden" name="action" value=form" />
<input type="hidden" name="topicparent" value="WebHome" />
<input type="hidden" name="onlynewtopic" value="on" />
<input type="hidden" name="templatetopic" value="NewRecipeTemplateStrict" />
<input type="hidden" name="topic" value="RecipeXXXXXXXXXX" />
<input type="submit" value="Create" />
</form>
When I clicked the "Create" button, I got an error message:
Attention
"Friends/Vicki.NewRecipeTemplateStrict" topic does not exist
You are trying to templatetopic a topic that does not exist.
When I fixed that problem, the new page was created in the Friends/Vicki sub (not the Recipes subweb) and the form was "not available".
Workaround
<form name="new" action="%SCRIPTURLPATH%/edit%SCRIPTSUFFIX%/%INTURLENCODE{"%WEB%"}%">
<input type="hidden" name="action" value=form" />
<input type="hidden" name="topicparent" value="%WEB%.WebHome" />
<input type="hidden" name="onlynewtopic" value="on" />
<input type="hidden" name="templatetopic" value="%WEB%.NewRecipeTemplateStrict" />
<input type="hidden" name="topic" value="%WEB%.RecipeXXXXXXXXXX" />
<input type="submit" value="Create" />
</form>
Problem
Apparently, "templatetopic" and "topic" URL parameters need to be fully qualified. Unlike most topic names, they aren't assumed to be in the "current" subweb. Most odd.
--
TWiki:Main/VickiBrown
- 09 Dec 2007