%FORM{topic="..." formfields="..." ...}%
Parameter: | Description: | Default: |
---|---|---|
"..." ortopic="..." | Name of topic containing the TWiki form, such as "Bug1234" . Specify topic name or Web.TopicName | Current topic |
default="..." | Text shown when no form or form fields are found | "" |
encode="html" | Encode special characters in form field value into HTML entities. Additional encodings available: encode="quote" , encode="moderate" , encode="safe" , encode="entity" and encode="url" . See ENCODE for details. | "" (no encoding) |
format="..." | Format of one form field. Supported variables: • $title - raw field name (includes space and other special characters). • $name - field name (sanitized title). • $type - form field type. • $size - size of field or selector. • $value - form field value. • $value(20, -<br />) - value hyphenated every 20 characters using separator -<br />. • $value(30, ...) - value shortened to 30 characters. • $length - length of form field value. • $tooltip - tooltip message. • $attributes - type attributes, such as H for hidden, M for mandatory. • $formweb - name of web containing the form definition. • $formtopic - name of topic containing the form definition. See details in TWikiForms#FormFieldTypes. | "| $title: | $value |" |
formfields="..., ..." | Specify names of TWiki form fields to show, in sequence. The all token shows all remaining fields. | "all" |
header="..." | Form header, typically containing the form name. If "on" , the default format "| *[[$formweb.$formtopic][$formtopic]]* ||" is used. If "none" , the header is suppressed. Supported variables: • $formweb - name of web containing the form definition. • $formtopic - name of topic containing the form definition. | "on" |
newline="$br" | Convert newlines in textarea to other delimiters. Variable $br expands to <br /> tag, and $n to a newline. Other text is encoded based on encode parameter. | "$br" if format is a TWiki table, else "\n" |
rev="..." | Get the form from the specified topic revision, range "1" to top revision of topic. "0" is equivalent to the top revision | The rev URL parameter value if present, else the top revision |
separator="..." | Line separator. Variable $br expands to <br /> tag, and $n to a newline. | "$n" |
showhidden="..." | Set to "on" to show also hidden form fields. | "" |
%FORM{topic="%INCLUDINGTOPIC%"}%
- show form data of the including topic (typically used in an included header)
%FORM{topic="Projects.SushiProject" formfields="Title, Status, Deadline" header="none"}%
- show a subset of form fields
%FORM{format="$name" header="none" separator=", "}%
- get all visible form field names as a list