none
[openafs-wiki.git] / TWiki / AnApplicationWithWikiForm.mdwn
1 ## <a name="FAQ:"></a> FAQ:
2
3 How can I create a simple [[TWiki Form|Main/TWikiForms]] based application?
4
5 ## <a name="Answer:"></a> Answer:
6
7 1. Create a TWiki Form and define fields (see [[TWikiForms]] for details)
8 2. Add the form in the list of Web Forms. Set the variable WEBFORMS in [[WebPreferences]]
9 3. Create a Template Topic
10 4. In edit mode add the [[TWiki Form|Main/TWikiForms]] you defined to the Template Topic using the "Add Form" button
11 5. Create a HTML Form with necessary fields
12 6. Define `SEARCH` function for listing items (see [[VarSEARCH]] for details)
13
14 For more information follow the links...
15
16 The following is the code source of [[TWikiFAQ]]:
17
18     <form action="%SCRIPTURLPATH{edit}%/%WEB%/">
19     New FAQ topic: &nbsp; (Use a name in TWiki.WikiNotation) <br />
20     <input type="text" name="topic" size="32" />&nbsp;<input type="submit" class="twikiSubmit" value="Create Topic" />
21     <input type="hidden" name="onlywikiname" value="on" />
22     <input type="hidden" name="templatetopic" value="TWikiFaqTemplate" />
23     <input type="hidden" name="topicparent" value="%TOPIC%" />
24     <br />
25     </form>
26
27 ----
28
29 And the `SEARCH` function:
30
31     %SEARCH{ "Back to\:__ TWikiFAQ" casesensitive="on" type="regex" nosearch="on" nototal="on"}%
32
33 **_Back to:_** [[TWikiFAQ]]
34
35 **_Related Topics:_** [[UserDocumentationCategory]]
36
37 -- **_Contributors:_** TWiki:Main.MiyokoTakushima - 18 Oct 2004