VWcms Reader Form  
 

[PREV][NEXT]

[PRINT]

VWcms uses the $$FORM$$ directive to allow information to be solicited from the reader.

All of the familiar HTML form elements are available.

check box:  one two three
radio button:  four five six
selection list:
text field:
text area:
submit button:
reset button:

Submitted form content can be emailed, stored in a site file or post-processed by a site-supplied procedure; in any of plain-text, HTML, XML fragment or raw (POST body) formats.

$$FORM$$ Parameters

A form must begin with an action specifying an email, spawn or store parameter before subsequent elements may be used.  One form per section is supported.  Form elements may be placed independently within other HTML structure (e.g. tables, new lines, paragraphs) allowing specific form layout on the page.  Form action directives are best placed outside of (in front of) table structures.

Directive Description Parameter(s)
$$FORM$action=email=address$$ Begins a form and specifies the POSTed result will be emailed. Any email address that can be processed by the VWcms system (i.e. VMS, DECnet or SMTP).
$$FORM$action=spawn=name.COM$$ Begins a form and specifies the POSTed result will be processed by a procedure external to VWcms. The name of a DCL procedure located withing the site that will process the content.
$$FORM$action=store=name$$ Begins a form and specifies that the result will be appended to a file within the site. If the name is omitted a file name is derived from the section name.  If a name is specified that is used to generate the file name.
$$FORM$text=name$$ Displays a text input field (single line text). The optional parameters $size=integer$ can be used to specify the displayed length, and $value=string$ the default value.
$$FORM$area=name$$ Displays a text-area input field (multi-line text). The optional parameters $size=rows/cols$ can be used to specify the number of rows and columns in the text area, and $value=string$ the default value displayed.
$$FORM$check=name$$ Displays one or more check boxes. One of more values must be specified using the $value=...$ parameter.  All subsequent parameter are considered values, each separated by a dollar.  An optional parameter $align=vertical$ or $align=horizontal$ aligns the check box list.
$$FORM$radio=name$$ Displays a group of radio selectors. One of more values must be specified using the $value=...$ parameter.  All subsequent parameter are considered values, each separated by a dollar.  An optional parameter $align=vertical$ or $align=horizontal$ aligns the radio selector list.
$$FORM$select=name$$ Displays a selector list. One of more values must be specified using the $value=...$ parameter.  All subsequent parameter are considered values, each separated by a dollar.  An optional parameter $size=integer$ specifies the number of items displayed.
$$FORM$submit=name$$ Displays a submit button. The submit button initiates form processing.  The name of the button is available in form data allowing multiple buttons to be used.  An optional $value=...$ parameter allows the button label to be specified.
$$FORM$reset$$ Displays a reset button. Restores form content to that at page load.  An optional $value=...$ parameter allows the button label to be specified.
$$FORM$goto=section$$$ After successful submission goto this section. When a form is successfully submitted redirection to this section is performed.
$$FORM$set=label$$ Displays a form fieldset. Browser usually places a box around the form fields to aggregate them.  Set is terminated using a $$FORM$SET$$ or with a new set.
$$FORM$insert=parameter$$$ Insert some data into the form during submission. This inserts either a literal string into to submitted form data using $$FORM$insert="string"$$, or the value of a CGI variable using $$FORM$insert=variable-name$$.

Parameter Example

The form elements illustration displayed at the beginning of this section was created using the following $$FORM$$ parameters inside a table structure.

check box: $$FORM$check=val_check$value=`one$two$three$$
radio button: $$FORM$radio=val_radio$value=four$`five$six$$
selection list: $$FORM$select=val_select$value=seven$eight$`nine$$
text field: $$FORM$text=val_text$$
text area: $$FORM$area=val_area$size=3x40$value=... and can include default values$$
submit button: $$FORM$submit=val_submit$value=Submit VWcms Form$$
reset button: $$FORM$reset$value=Reset Form Content$$

Note that default items are checked or selected by prefixing them with a back-tick ( ` ), for example the one, five, and nine items.

A form field, and where applicable individual values, may be disabled by prefixing with an exclamation mark ( ! ).

check box: $$FORM$check=val_check$value=`one$!two$three$$

 one two three
text field: $$FORM$!text=val_text$$

submit button: $$FORM$!submit=val_submit$value=Submit VWcms Form$$

A form field can be made mandatory (see Form Processing) by prefixing with a plus symbol ( + ).

[PRINT]  [PRINT]