Difference: VarEDITFORMFIELD (2 vs. 3)

Revision 32016-08-31 - TWikiContributor

Line: 1 to 1
 
META TOPICPARENT name="TWikiVariables"

EDITFORMFIELD{"fieldname" form=""} -- render an input field specified in a form template topic

Line: 16 to 16
 
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:
"form" type="start" action="save" topic="..." method="" onsubmit="" onreset=""
action: Specify a TWiki script (view, edit, save, ...), or a full action URL, default "view".
topic: Specify topic name or Web.TopicName, default current topic; ignored if full action URL is provided.
method: HTML form action method, default "post" for save action, else "get".
onsubmit: Execute JavaScript when the form is submitted, optional.
onreset: Execute JavaScript when the reset button is clicked, optional.
""
type="end" Special case: End an HTML form. Parameters:
"form" type="end"
""
Changed:
<
<
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:
"fieldname" type="hidden" value="..." - hidden input field.
"fieldname" type="submit" value="..." - submit button, value is button label.
"fieldname" type="button" value="..." onclick="..." - regular button, value is button label.
"fieldname" type="text" value="..." size="80" - text input field.
"fieldname" type="checkbox" value="..." text="..." - checkbox, text is display text.
"fieldname" type="radio" value="..." text="..." - radio button, text is display text.
• In addition, any valid XHML and HTML5 input type is supported, such as type="date", type="file", type="image".
Additional type-specific parameters can be supplied, such as alt="", checked="checked", class="", max="", min="", src="", style="", width="". Consult HTML documentation.
""
>
>
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:
"fieldname" type="hidden" value="..." - hidden input field.
"fieldname" type="submit" value="..." - submit button, value is button label.
"fieldname" type="button" value="..." onclick="..." - regular button, value is button label.
"fieldname" type="text" value="..." size="80" - text input field.
"fieldname" type="textarea" value="..." size="80x6" - multi line text area field, size denotes columns x rows.
"fieldname" type="checkbox" value="..." text="..." - checkbox, text is display text.
"fieldname" type="radio" value="..." text="..." - radio button, text is display text.
• In addition, any valid XHML and HTML5 input type is supported, such as type="date", type="file", type="image".
Additional type-specific parameters can be supplied, such as alt="...", checked="checked", class="...", max="...", min="...", placeholder="...", src="...", style="...", width="...". Consult HTML documentation.
""
 
  • Example: %EDITFORMFIELD{ "ReleaseType" form="PackageForm" value="Beta-1" }%
  • Example: Custom form in an included header to update some values of the base topic
    %EDITFORMFIELD{ "form" type="start" action="save" topic="%BASEWEB%.%BASETOPIC%" method="post" }%
Line: 26 to 26
 
%EDITFORMFIELD{ "Updated" type="hidden" value="%SERVERTIME{$year-$mo-$day}%" }%
%EDITFORMFIELD{ "form" type="end" }%
Changed:
<
<
>
>
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 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.