none
[openafs-wiki.git] / TWiki / VarFORMFIELD.mdwn
1 <a name="VarFORMFIELD"></a>
2
3 ### <a name="FORMFIELD{&quot;fieldname&quot;} -- render"></a> FORMFIELD\{"fieldname"\} -- renders a field in the form attached to some topic
4
5 - Syntax: `%FORMFIELD{"fieldname"}%`
6 - Supported parameters: <table border="1" cellpadding="0" cellspacing="0">
7   <tr>
8     <th bgcolor="#99CCCC"><strong> Parameter: </strong></th>
9     <th bgcolor="#99CCCC"><strong> Description: </strong></th>
10     <th bgcolor="#99CCCC"><strong> Default: </strong></th>
11   </tr>
12   <tr>
13     <td><code>"fieldname"</code></td>
14     <td> The name of a [[Main/TWikiForms]] field </td>
15     <td> required </td>
16   </tr>
17   <tr>
18     <td><code>topic="..."</code></td>
19     <td> Topic where form data is located. May be of the form <code>Web.TopicName</code></td>
20     <td> Current topic </td>
21   </tr>
22   <tr>
23     <td><code>format="..."</code></td>
24     <td> Format string. <code>$value</code> expands to the field value, and <code>$title</code> expands to the field title </td>
25     <td><code>"$value"</code></td>
26   </tr>
27   <tr>
28     <td><code>default="..."</code></td>
29     <td> Text shown when no value is defined for the field </td>
30     <td><code>""</code></td>
31   </tr>
32   <tr>
33     <td><code>alttext="..."</code></td>
34     <td> Text shown when field is not found in the form </td>
35     <td><code>""</code></td>
36   </tr>
37 </table>
38 - Example: `%FORMFIELD{"ProjectName" topic="Projects.SushiProject" default="(not set)" alttext="ProjectName field found"}%`
39 - Related: [[SEARCH|Main/WebHome#VarSEARCH]]