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:
    • %EDITFORMFIELD{"fieldname" form="...Form"}% - create form field defined in a TWiki Form template
    • %EDITFORMFIELD{"fieldname" topic="..."}% - create form field based on a topic that has a TWiki Form & initialize its value
    • %EDITFORMFIELD{"fieldname" type="..."}% - create an HTML input field
  • Supported parameters:
Parameter: Description: Default:Sorted ascending
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=""
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".
""
type="end" Special case: End an HTML form. Parameters:
"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:
"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.
""
format="..." Format string. Supported variables:
$inputfield - rendered form input field.
$title - raw field name (includes space and other special characters).
$name - field name (sanitized title).
$size - size of field or selector.
$value - initial value, or select options.
$tooltip - tooltip message.
$attributes - type attributes, such as H for hidden, M for mandatory.
$extra - extra information, such as * for mandatory field.
See details in TWikiForms#FormFieldTypes. This parameter is ignored if type="..." is specified.
"$inputfield"
form="..." Name of form template topic, such as "BugForm". Specify topic name or Web.TopicName Either form or topic
is required unless
type is specified
topic="..." Name of topic containing form, such as "Bug1234". Specify topic name or Web.TopicName Either form or topic
is required unless
type is specified
"fieldname" The name of a TWiki form field or HTML form field. Required
r1 - 14 Oct 2013 - 00:34:49 - TWikiContributor
 
Linux & Open Source for AT91 Microchip Microprocessors

Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.

Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.

Microchip® and others, are registered trademarks or trademarks of Microchip Technology Inc. and its subsidiaries. This site is powered by the TWiki collaboration platform

Arm® and others are registered trademarks or trademarks of Arm Limited (or its affiliates). Other terms and product names may be trademarks of others.

Ideas, requests, contributions ? Connect to LinksToCommunities page.

Syndicate this siteRSS ATOM