#VarFORMFIELD ---+++ FORMFIELD{"fieldname"} -- renders a field in the form attached to some topic * Syntax: =%<nop>FORMFIELD{"fieldname"}%= * Supported parameters: | *Parameter:* | *Description:* | *Default:* | | ="fieldname"= | The name of a [[TWikiForms][TWiki form]] field | required | | =topic="..."= | Topic where form data is located. May be of the form =Web.<nop>TopicName= | Current topic | | =format="..."= | Format string. Variable =$value= expands to the field value, =$title= to the raw field name, =$name= to the field name, =$attributes= to the attributes, =$type= to the form field type, =$size= to the size, and =$definingTopic= to the form definition topic. | ="$value"= | | =default="..."= | Text shown when no value is defined for the field | =""= | | =alttext="..."= | Text shown when field is not found in the form | =""= | | =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. | no conversion | | =encode="html"= | Encode special characters into HTML entities. If a FORMFIELD is passed into an HTML form field it should be encoded as ="html"=. 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) | * Example: =%<nop>FORMFIELD{"<nop>ProjectName" topic="Projects.<nop>SushiProject" default="(not set)" alttext="<nop>ProjectName field not found"}%= * Example: =<input type="text" name="Address" value="%<nop>FORMFIELD{ "Address" encode="html" }%" />= * Related: [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarENCODE][ENCODE]], [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarMETASEARCH][METASEARCH]], [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarSEARCH][SEARCH]], FormattedSearch, QuerySearch, SearchHelp
This topic: TWiki
>
WebHome
>
TWikiVariables
>
VarFORMFIELD
Topic revision: r5 - 14 Jun 2011 - TWikiContributor
Copyright © 1999-2024 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.VarFORMFIELD
.