Search:

Wiki Formatting: Input Forms

Abstract: This text lists and explains wiki markup for HTML forms.

yawk supports HTML input forms. The common format of the markup sequences is

:" type [sizes] name " value ".

No newline is allowed between the initial :" and the ".. Notice furthermore that the blank behind the initial :" is significant.

Table 1 - Input Form Sequences
Markup Function
:" E [method] url ". starts an input form like F but set multipart/form-data as form encoding.
:" F [method] url ". starts an input form, url is the ACTION URL and method the request method (default is GET).
:" C name " value " vlist ". creates a check box having the name name, returning value if it's checked and vlist as current value list. If value is in vlist which is a comma separated list of values the box is checked.
:" H name " value ". creates a hidden field.
:" I name " value ". creates an text input field with the name name and value as it's default value.
:" L name " list " val ". creates a drop down listbox. The listbox's items are created from list which is a comma separated list of the individual value keys. Each key value can be followed by a colon and the key's display text. If no display text is given the key value is used.
:" M name " list " val ". same as L but creates a multiple choice listbox. Each list key found in val (comma separated list) is checked.
:" P name " value ". creates a password input field.
:" T name " value ". creates a text input field.
:" R name " value " vlist ". same as C but creates a radio box.
:" S name " value ". creates a submit button.
:" U name ". adds a file upload box, requires that the FORM is opened as E.
:". ends the form.

The name parameter can be preceded by a sequence of digits followed by a "s" to set the fields's size.

Notice that due to the way form sequences are recognized they can not span multiple input lines. Otherwise they are not recognized and passed unprocessed into the output. Furthermore there can not be two form sequences on one input line, they would be recognized as one.

There are also some restrictions on the characters you can use in field definitions. First you can not pass a double quote as part of a field's value and second neither colons nor commas can be used in a listbox key entries.

< dag | at | awk-scripting.de >