Tags:
tag this topic
create new tag
view all tags
#VarFORM ---+++ FORM{} -- render a TWiki form for view * Show a table containing data of a [[TWikiForms][TWiki form]] attached to a topic * Syntax: =%<nop>FORM{topic="..." formfields="..." ...}%= * Supported parameters: | *Parameter:* | *Description:* | *Default:* | | ="..."= or%BR% =topic="..."= | Name of topic containing the TWiki form, such as ="Bug1234"=. Specify topic name or =Web.TopicName= | Current topic | | =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 | | =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 ="%VBAR% <nop>*[<nop>[$formweb.$formtopic][$formtopic]]*<nop> %VBAR%%VBAR%"= is used. If ="none"=, the header is suppressed. Supported variables: %BB% =$formweb= - name of web containing the form definition. %BB% =$formtopic= - name of topic containing the form definition. | ="on"= | | =format="..."= | Format of one form field. Supported variables: %BB% =$title= - raw field name (includes space and other special characters). %BB% =$name= - field name (sanitized title). %BB% =$type= - form field type. %BB% =$size= - size of field or selector. %BB% =$value= - form field value. %BB% =$value(<i>20, -<br /></i>)= - value hyphenated every 20 characters using separator <tt>-<br /></tt>. %BB% =$value(<i>30, ...</i>)= - value shortened to 30 characters. %BB% =$length= - length of form field value. %BB% =$tooltip= - tooltip message. %BB% =$attributes= - type attributes, such as H for hidden, M for mandatory. %BB% =$formweb= - name of web containing the form definition. %BB% =$formtopic= - name of topic containing the form definition. %BR% See details in TWikiForms#FormFieldTypes. | ="%VBAR% $title: %VBAR% $value %VBAR%"= | | =separator="..."= | Line separator. Variable =$br= expands to =<br />= tag, and =$n= to a newline. | ="$n"= | | =default="..."= | Text shown when no form or form fields are found | =""= | | =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"= | | =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 [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarENCODE][ENCODE]] for details. | =""= (no encoding) | | =showhidden="..."= | Set to ="on"= to show also hidden form fields. | =""= | * Examples: * =%<nop>FORM{topic="%<nop>INCLUDINGTOPIC%"}%= - show form data of the including topic (typically used in an included header) * =%<nop>FORM{topic="Projects.<nop>SushiProject" formfields="Title, Status, Deadline" header="none"}%= - show a subset of form fields * =%<nop>FORM{format="$name" header="none" separator=", "}%= - get all visible form field names as a list * Category: DatabaseAndFormsVariables, DevelopmentVariables, FormattingAndRenderingVariables * Related: [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarEDITFORM][EDITFORM]], [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarEDITFORMFIELD][EDITFORMFIELD]], [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarENCODE][ENCODE]], [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarENTITY][ENTITY]], [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarFORMFIELD][FORMFIELD]], [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarMETA][META]], [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarMETASEARCH][METASEARCH]], [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarSEARCH][SEARCH]], TWikiForms, FormattedSearch, QuerySearch, SearchHelp
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r1
|
B
acklinks
|
V
iew topic
|
M
ore topic actions
Topic revision: r1 - 2014-06-11
-
TWikiContributor
Home
Site map
Main web
Sandbox web
TWiki web
TWiki Web
User registration
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
P
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
User Reference
ATasteOfTWiki
TextFormattingRules
TWikiVariables
FormattedSearch
QuerySearch
TWikiDocGraphics
TWikiSkinBrowser
InstalledPlugins
Admin Maintenance
Reference Manual
InterWikis
ManagingUsers
ManagingWebs
TWikiSiteTools
TWikiPreferences
WebPreferences
Categories
Admin Documentation
Admin Tools
Developer Doc
User Documentation
User Tools
Account
Log In
Register User
E
dit
A
ttach
Copyright © 1999-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback
Note:
Please contribute updates to this topic on TWiki.org at
TWiki:TWiki.VarFORM
.