NOTE: This is a
DistributionDocument. Please help maintain high quality documentation: This is a wiki, please
fix the documentation if you find errors or incomplete content. Put questions and suggestions concerning the
documentation of this topic in the
comments section below. Use the
Support web for problems you are having
using TWiki.
FAQ:
How can I create a simple TWiki Form based application?
Answer:
- Create a TWiki Form and define fields (TWikiForms)
- Add the form in the list of Web Forms. Set the variable WEBFORMS in WebPreferences
- Create a Template Topic
- In edit mode add the TWiki Form you defined to the Template Topic using the "Add Form" button
- Create a HTML Form with necessary fields
- Define
SEARCH function for listing items. See VarSEARCH
For more information follow the links...
The following is the code source of
TWikiFAQ:
<form action="%SCRIPTURLPATH{edit}%/%WEB%/">
New FAQ topic: (Use a name in TWiki.WikiNotation) <br />
<input type="text" name="topic" size="32" /> <input type="submit" class="twikiSubmit" value="Create Topic" />
<input type="hidden" name="onlywikiname" value="on" />
<input type="hidden" name="templatetopic" value="TWikiFaqTemplate" />
<input type="hidden" name="topicparent" value="%TOPIC%" />
<br />
</form>
And the
SEARCH function:
%SEARCH{ "Back to\:__ TWikiFAQ" casesensitive="on" regex="on" nosearch="on" nototal="on"}%
Back to: TWikiFAQ
Related Topics: UserDocumentationCategory
--
TWiki:Main.MiyokoTakushima - 18 Oct 2004
Comments & Questions about this Distribution Document Topic
I want to pass some entries from the HTML form into the fields in the TWiki form in the newly created topic. Using URLPARAM (in the template) I can place information into the body of the topic, but when I place URLPARAM statements into the data fields of the form in the template they are not expanded. Any ideas...? Thanks,
Chris.
--
ChrisWrigley - 30 Oct 2006
Chris - you don't have to put urlparam statements in the form data fields. All you have to do is set the name attributes to your html form elements to exactly match the TWiki form field names you want to populate.
--
LynnwoodBrown - 30 Oct 2006