WEBITEM

Top  Previous  Next

Syntax

 

webitem "name", input|textarea|radio|checkbox|select|button ["list"] [, attributes]

 

Description

 

Used by the SDSI Web Extension as part of an integration rule set.  This command creates an input widget of the type specified, and with additional attributes specified.  In the case of a radio, checkbox, or select widget, a semi-colon delimited list is provided with the available values.

 

The name value is used as a label for the field, and as cgi.field_name$ when the form is submitted.  Spaces are converted to underscores in the cgi field name (i.e. cgi.field_doc_id$).

 

To add addition attributes to input, textarea, button, or select widgets, specify them as HTML attribute tags.  Attributes should be space-separated, as they are added directly to the widget tag.

 

Examples

 

This creates a simple input element, 120 pixels wide, with a placeholder (suggestion text).

 

webitem "Comment", input, style="width:120px;" placeholder="Enter a comment"

 

This creates three radio buttons, one of which can be selected.  When submitted, cgi.field_options$ will have the checked value.

 

webitem "Options", radio "Option 1;Option 2;Option 3"

 

This creates a password field that will obscure the input.

 

webitem "PIN Code", input, type="password" size="6"

 

This creates a submission button, which when clicked will cause the web form to be submitted with cgi.button$="Get Invoice".

 

webitem "Get Invoice", button, style "padding-left:5px;padding-right:5px;"