Verbatim
"post"));
$output = tag.
function end_form ()
{
$output =
EOQ;
return $output;
}
// string text_field ([string name [, string value [, int size [, int maximum length]]]])
// This function returns an HTML text input field. The default size
// of the field is 10. A value and maximum data length for the field
// may be supplied.
function text_field ($name="", $value="", $size=10, $maxlen="")
{
$maxatt = empty($maxlen) ? "" : "maxlength=\"$maxlen\"";
$output = EOQ
EOQ;
return $output;
}
// string textarea_field([string name [, string value [, int cols [, int rows [, string wrap mode]]]]])
// This function returns an HTML textarea field. The default size is
// 50 columns and 10 rows, and the default wrap mode is 'soft', which means
// no hard newline characters will be inserted after line breaks in what
// the user types into the field. The alternative wrap mode is 'hard',
// which means that hard newlines will be inserted.
function textarea_field ($name="", $value="", $cols=50, $rows=10, $wrap="soft")
{
$output = EOQ
$value
EOQ;
return $output;
}
// string password_field ([string name [, string value [, int size [, int maximum length]]]])
// This function returns an HTML password field. This is like a text field,
// but the value of the field is obscured (only stars or bullets are visible
// for each character). The default size of the field is 10. A starting
// value and maximum data length may be supplied.
function password_field ($name="", $value="", $size=10, $maxlen="")
{
$output = EOQ
EOQ;
return $output;
}
// string hidden_field ([string name [, string value]])
// This function returns an HTML hidden field. A value may be supplied.
function hidden_field ($name="", $value="")
{
$output = EOQ
EOQ;
return $output;
}
// string file_field ([string name])
// This function returns an HTML file field. These are used to specify
// files on the user's local hard drive, typically for uploading as
// part of the form. (See http://www.zend.com/manual/features.file-upload.php
// for more information about this subject.)
function file_field ($name="")
{
$output = EOQ
EOQ;
return $output;
}
// string submit_field ([string name [, string value]])
// This function returns an HTML submit field. The value of the field
// will be the string displayed by the button displayed by the user's
// browser. The default value is "Submit".
function submit_field ($name="", $value="")
{
if (empty($value)) { $value = "Submit"; }
$output = EOQ
EOQ;
return $output;
}
// string image_field ([string name [, string src [, string value]]])
// This function returns an HTML image field. An image field works
// likes a submit field, except that the image specified by the URL
// given in the second argument is displayed instead of a button.
function image_field ($name="", $src="", $value="")
{
if (empty($value)) { $value = $name; }
$output = EOQ
EOQ;
return $output;
}
// string reset_field ([string name [, string value]])
// This function returns an HTML reset field. A reset field returns
// the current form to its original state.
function reset_field ($name="reset", $value="Reset")
{
$output = EOQ
EOQ;
return $output;
}
// string checkbox_field ([string name [, string value [, string label [, string match]]]])
// This function returns an HTML checkbox field. The optional third argument
// will be included immediately after the checkbox field, and the pair
// is included inside a HTML tag - meaning that they will be
// displayed together on the same line. If the value of the
// second or third argument matches that of the fourth argument,
// the checkbox will be 'checked' (i.e., flipped on).
function checkbox_field ($name="", $value="", $label="", $match="")
{
$checked = ($value == $match || $label == $match) ? "checked" : "";
$output = EOQ
$label
EOQ;
return $output;
}
// string radio_field ([string name [, string value [, string label [, string match]]]])
// This function returns an HTML radio button field. The optional third
// argument will be included immediately after the radio button, and the pair
// is included inside a HTML tag - meaning that they will be
// displayed together on the same line. If the value of the
// second or third argument matches that of the fourth argument,
// the radio button will be 'checked' (i.e., flipped on).
function radio_field ($name="", $value="", $label="", $match="")
{
$checked = ($value == $match || $label == $match) ? "checked" : "";
$output = EOQ
$label
EOQ;
return $output;
}
// string select_field ([string name [, array items [, string default value]]])
// This function returns an HTML select field (a popup field).
// If the optional second argument is an array, each key in the array
// will be set to the value of an option of the select field, and
// the corresponding value from the array will be the displayed string
// for that option. If the key or the value from the array matches
// the optional third argument, that option will be designated as the default
// value of the select field.
function select_field ($name="", $array="", $value="")
{
$output = EOQ
EOQ;
if (is_array($array))
{
while (list($avalue,$alabel) = each($array))
{
$selected = ($avalue == $value || $alabel == $value) ?
"selected" : ""
;
$output .= EOQ
$alabel
EOQ;
}
}
$output .= EOQ

































