%EDITFORM{topic="..." formfields="..."}%
Parameter: | Description:![]() | Default: | |||
---|---|---|---|---|---|
default="..." | Text shown when no form or form fields are found | "" | |||
formfields="..., ..." | Specify names of TWiki form fields to use, in sequence. The all token shows all remaining fields. | "all" | |||
action="..." | Specify a TWiki script (view , edit , save , ...), or the full URL of an action to take on form submit. | "save" | |||
"..." ortopic="..." | Name of topic containing the TWiki form, such as "Bug1234" . Specify topic name or Web.TopicName | Either "..." , topic="" or formtemplate="" is required | |||
formtemplate="..." | Name of form template topic, such as "BugForm" . Specify topic name or Web.TopicName | Either "..." , topic="" or formtemplate="" is required | |||
hiddenfields="..., ..." | List of form field names to use as hidden fields. For each name listed in hiddenfields="" , add a name="value" parameter to specify the value of the hidden input field. If you omit the name="value" parameter for a hidden input field, it will be excluded as a form field, even with a formfields="all" . | "" | |||
separator="..." | Line separator. Variable $br expands to <br /> tag, and $n to a newline. | "$n" | |||
method="..." | HTML form action method. | "post" for saveaction, else "get" | |||
submit="..." | Format of submit button row. Line separator. Variable $submit expands to submit input field with label "Save", $submit(Save) to a submit input field with specific label. | " | $submit | " | |
format="..." | Format of one form field. Supported variables: â\x{fffd}¢ $inputfield - rendered form input field. â\x{fffd}¢ $title - raw field name (includes space and other special characters). â\x{fffd}¢ $name - field name (sanitized title). â\x{fffd}¢ $size - size of field or selector. â\x{fffd}¢ $value - initial value, or select options. â\x{fffd}¢ $tooltip - tooltip message. â\x{fffd}¢ $attributes - type attributes, such as H for hidden, M for mandatory. â\x{fffd}¢ $extra - extra information, such as * for mandatory field. â\x{fffd}¢ $formweb - name of web containing the form definition. â\x{fffd}¢ $formtopic - name of topic containing the form definition. See details in TWikiForms#FormFieldTypes. | " | $title: $extra | $inputfield | " |
header="..." | Form header, typically containing the form name. If "on" , the default format is used:" | *[[$formweb.$formtopic][$formtopic]]* | " Supported variables: â\x{fffd}¢ $formweb - name of web containing the form definition. â\x{fffd}¢ $formtopic - name of topic containing the form definition. | "on" | |
onsubmit="..." | Execute JavaScript when the form is submitted, optional. | "" | |||
elements="..." | Elements of edit form: formstart is the HTML form tag, header the form header, formfields the form fields, submit the submit button, hiddenfields are hidden input fields, formend is the HTML form end tag. | "formstart, header, |
%EDITFORM{ topic="%INCLUDINGTOPIC%" }%
- show HTML form to update form data of the including topic (typically used in an included header)
%EDITFORM{
topic="%BASEWEB%.%BASETOPIC%"
formfields="Priority, Status"
hiddenfields="Updated"
Updated="%SERVERTIME{$year-$mo-$day}%"
submit=" | | $submit(Update) |"
}%