Tags:
view all tags
#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 | | =rev="..."= | Get the form field value 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, otherwise the top revision | | =format="..."= | Format string. Supported variables:%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 value (can be used to test if value is set) %BB% =$title= - raw field name (includes space and other special characters) %BB% =$name= - field name (sanitized title) %BB% =$attributes= - form field attributes %BB% =$formtopic= - name of 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"=, =encode="url"= and =encode="csv"=. 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" }%" />= * Note: It is easier to use [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarEDITFORMFIELD][EDITFORMFIELD]] for custom input fields * Category: DatabaseAndFormsVariables, DevelopmentVariables * Related: [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarEDITFORMFIELD][EDITFORMFIELD]], [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarENCODE][ENCODE]], [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarENTITY][ENTITY]], [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarMETA][META]], [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarMETASEARCH][METASEARCH]], [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarSEARCH][SEARCH]], FormattedSearch, QuerySearch, SearchHelp
Edit
|
Attach
|
Watch
|
P
rint version
|
H
istory
:
r9
<
r8
<
r7
<
r6
<
r5
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r7 - 2014-03-22
-
TWikiContributor
Home
Site map
Main web
ATLAS_2010_S8894728 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
Edit
Attach
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
.