os_form |
A fill-in form to collect user input.
An os_form
is a collection of elements that include input elements, selection elements, and
block-structuring elements used for collecting information from users. Following
is a list of input and selection elements that can be included on the form.
os_input_text
-A text entry field for a single line of text.os_input_password
-An entry field for a single line of text. Characters typed into a password
field are not encrypted but are echoed on the monitor as asterisks (*) when
they are typed.os_text_area
-A text entry field for multiple lines of text.os_input_radio
-A selection element that declares the possible responses for a selection
field when you want to restrict selection to a single choice.os_radio_group
-An object that defines a group of radio buttons.os_input_checkbox
-A selection element that declares the possible responses for a selection
field when you want to permit selection of multiple choices.os_checkbox_group
-An object that defines a group of checkboxes.os_input_hidden
-A text field where no field is seen on the form, but the field content is
sent when the form is submitted. This field is useful for transmitting
internal information, and is typically used for maintaining state between
separate CGI program invocations.os_select
-A pulldown list of choices. The response is restricted to a single choice
by default.os_input_reset
-Resets the form fields to their initial values.os_input_submit
-Transmits the contents of the form. Each input element within an os_form
is identified by a name. Input element names are not required to be unique. When
an os_form is submitted, the name of each input
element is paired with the current value of the input element (its content) and
transmitted. An input element with a null value (an empty os_input_text
or an unselected os_input_checkbox ) may not be
transmitted by the browser.
An os_form
must specify where to send the element data in the form of an action URL. When
the form is submitted, information entered on a form is transmitted according to
the specified action.
An os_form
that specifies an HTTP URL can also specify the HTTP method to send the form
data to the server. The submit method can either be post
or get . By default, os_form
data is sent using the post method. This is also
the recommended method.
The action and submit methods are
specified in the constructor and can be modified through the action()
and method() member functions.
An os_form
that specifies an HTTP action URL and the post
submit method can specify the MIME type used to encode the form data through the
encode() member function. Browsers default to the
MIME type application/x-www-form-urlencoded , which
at present is the only generally supported MIME type.
Elements are inserted into an os_form
through either the add() member function or operator<<
.
Note that os_form
objects cannot be nested.
enum os_form::submit_method
{
post, // Submits form data using the HTTP post method.
get // Submits form data using the HTTP get method.
};
post ).Copyright©1994-2026 Recursion
Software LLC
All Rights Reserved