Tags:
view all tags
#VarEDITFORMFIELD ---+++ EDITFORMFIELD{"fieldname" form=""} -- render an input field specified in a form template topic * Use this to create HTML forms that update TWikiForms, such as a custom "create new topic" form, or a topic header that allows users to change some form values at the top of the page. A valid form is composed of a start form type, various form fields, a submit type, and an end form type. * Syntax: * =%<nop>EDITFORMFIELD{"fieldname" form="...Form"}%= - create form field defined in a TWiki Form template * =%<nop>EDITFORMFIELD{"fieldname" topic="..."}%= - create form field based on a topic that has a TWiki Form & initialize its value * =%<nop>EDITFORMFIELD{"fieldname" type="..."}%= - create an HTML input field * Supported parameters: | *Parameter:* | *Description:* | *Default:* | | ="fieldname"= | The name of a [[TWikiForms][TWiki form]] field or HTML form field. | Required | | =form="..."= | Name of form template topic, such as ="BugForm"=. Specify topic name or =Web.TopicName= | <span style="white-space: nowrap;"> Either =form= or =topic= %BR% is required unless %BR% =type= is specified </span> | | =topic="..."= | Name of topic containing form, such as ="Bug1234"=. Specify topic name or =Web.TopicName= |^| | =format="..."= | Format string. Supported variables: %BB% =$inputfield= - rendered form input field. %BB% =$title= - raw field name (includes space and other special characters). %BB% =$name= - field name (sanitized title). %BB% =$size= - size of field or selector. %BB% =$value= - initial value, or select options. %BB% =$tooltip= - tooltip message. %BB% =$attributes= - type attributes, such as H for hidden, M for mandatory. %BB% =$extra= - extra information, such as %RED%*%ENDCOLOR% for mandatory field. %BR% See details in TWikiForms#FormFieldTypes. This parameter is ignored if =type="..."= is specified. | ="$inputfield"= | | =value="..."= | Initial value of input field. If omitted and if =topic="..."= is specified, the value is taken from the named form field. | =""= | | =type="start"= | Special case: Start an HTML form. Parameters: %BR% ="form" type="start" action="save" topic="..." method=""= %BB% =action=: Specify a [[TWikiScripts][TWiki script]] (=view=, =edit=, =save=, ...), or a full action URL, default ="view"=. %BB% =topic=: Specify topic name or =Web.TopicName=, default current topic; ignored if full action URL is provided. %BB% =method=: HTML form action method, default ="post"= for save action, else ="get"=. | =""= | | =type="end"= | Special case: End an HTML form. Parameters: %BR% ="form" type="end"= | =""= | | =type="..."= | Special case: Create an input field regardless of the type defined in the !TWikiForm. Used mainly for hidden fields and submit button. The nameless parameter is the field name. Supported types: %BB% ="fieldname" type="hidden" value="..."= - hidden input field. %BB% ="fieldname" type="submit" value="..."= - submit button, =value= is button label. %BB% ="fieldname" type="button" value="..." onclick="..."= - regular button, =value= is button label. %BB% ="fieldname" type="text" value="..." size="80"= - text input field. %BB% ="fieldname" type="checkbox" value="..." text="..."= - checkbox, =text= is display text. %BB% ="fieldname" type="radio" value="..." text="..."= - radio button, =text= is display text. %BB% In addition, any valid XHML and HTML5 input type is supported, such as =type="date"=, =type="file"=, =type="image"=. %BR% Additional type-specific parameters can be supplied, such as =alt=""=, =checked="checked"=, =class=""=, =max=""=, =min=""=, =src=""=, =style=""=, =width=""=. Consult HTML documentation. | =""= | * Example: =%<nop>EDITFORMFIELD{ "ReleaseType" form="PackageForm" value="Beta-1" }%= * Example: Custom form in an included header to update some values of the base topic %BR% =%<nop>EDITFORMFIELD{ "form" type="start" action="save" topic="%<nop>BASEWEB%.%<nop>BASETOPIC%" method="post" }%= %BR% =| Priority: | %<nop>EDITFORMFIELD{ "Priority" topic="%<nop>BASETOPIC%" }% |= %BR% =| Status: | %<nop>EDITFORMFIELD{ "Status" topic="%<nop>BASETOPIC%" }% |= %BR% =| | %<nop>EDITFORMFIELD{ "form" type="submit" value="Update" }% |= %BR% =%<nop>EDITFORMFIELD{ "Updated" type="hidden" value="%<nop>SERVERTIME{$year-$mo-$day}%" }%= %BR% =%<nop>EDITFORMFIELD{ "form" type="end" }%= * Category: DatabaseAndFormsVariables, DevelopmentVariables, EditingAndContentUpdateVariables * Related: [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarEDITTABLE][EDITTABLE]], [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarFORMFIELD][FORMFIELD]], [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarMETASEARCH][METASEARCH]], [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarSEARCH][SEARCH]], FormattedSearch, QuerySearch, SearchHelp, TWikiForms, TWikiScripts
Edit
|
Attach
|
Watch
|
P
rint version
|
H
istory
:
r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r1 - 2013-10-14
-
TWikiContributor
Home
Site map
TWiki web
XLZDCryostat 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.VarEDITFORMFIELD
.