Difference: TWikiForms (30 vs. 31)

Revision 312014-12-11 - TWikiContributor

Line: 1 to 1
 

TWiki Forms - Foundation of TWiki Applications

Line: 143 to 143
 
  • Tooltip message column: The Tooltip message will be displayed when the cursor is hovered over the field in edit view.
Changed:
<
<
  • Attributes column: Attributes specifies special attributes for the field. Multiple attributes can be entered, separated by spaces.
    • An attribute H indicates that this field is hidden, e.g. not shown in view mode. However, the field is available for editing and storing information.
>
>
  • Attributes column: Attributes may contain additional key="value" form field attributes, separated by space.
    • A hidden="1" attribute indicates that this field is hidden, e.g. not shown in view mode. However, the field is available for editing and storing information. The deprecated H attribute has the same function, it is still supported but might be removed in a future TWiki release.
 
TIP Tip: The TWiki form header is suppressed in view mode if all fields of the form are hidden. For better usability it is good to hide the whole form if the display and interaction of all form fields is done externally. For example, the display and modification of form field values can be done in a header topic that is included in each page.
Changed:
<
<
    • An attribute M indicates that this field is mandatory. The topic cannot be saved unless a value is provided for this field. If the field is found empty during topic save, an error is raised and the user is redirected to an oops page. Mandatory fields are indicated by an asterisks next to the field name.
>
>
    • An mandatory="1" attribute indicates that this field is mandatory. The topic cannot be saved unless a value is provided for this field. If the field is found empty during topic save, an error is raised and the user is redirected to an oops page. Mandatory fields are indicated by an asterisks next to the field name. The deprecated M attribute has the same function, it is still supported but might be removed in a future TWiki release.
    • Additional form field type specific attributes can be used, such as onfocus="..." and spellcheck="..".
  For example, a simple form just supporting entry of a name and a date would look as follows:
Line: 187 to 188
 
Name Type Size Values Tooltip message Attributes
Changed:
<
<
Many types of form fields are available. Some are TWiki internal, some are provided by extensions. Find more TWiki form field extensions on TWiki.org. The Size and Value depend on the Type used. Form field types:
>
>
Many types of form fields are available. Some are TWiki internal, some are provided by extensions. Find more TWiki form field extensions on TWiki.org. The Size, Value and Attributes depend on the Type used. Form field types:
 
Type Description Size Value
text One-line text field Text box width in number of characters Initial (default) content
Line: 203 to 204
 
select+multi+values Combination of select+multi and select+values
color screenshot-small Single-line text box and a color picker to pick a color. The color can also be typed into the text box, such as #123456.
An attribute of type="popup" shows a button that, when clicked, opens a color picker popup. See details.
Text box width in number of characters Initial (default) color
date screenshot-small Text input field and a button next to it to pick a date from a pop-up calendar. The date can also be typed into the text box. See details. Text box width in number of characters Initial (default) date
Added:
>
>
Note on Attributes:

  • Common attributes: hidden, mandatory, class, form, onblur, onfocus, onchange, onselect, onmouseover, onmouseout, spellcheck, style, tabindex, title, translate
  • Type-specific attributes:
    • text type: id, max, maxlength, min, pattern, placeholder
    • textarea type: autocomplete, id, maxlength, minlength, pattern, placeholder, wrap
    • label type: id, max, maxlength, min
    • combobox type: max, maxlength, min, pattern, placeholder
 

Values in Other Topics

As described above, you can also retrieve possible values for select, checkbox or radio types from other topics. For example, if you have a rows defined like this:

 
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.TWikiForms.