$Web_Form_Parm_Lstr

From m204wiki
Revision as of 21:20, 12 June 2012 by JAL2 (talk | contribs) (→‎Syntax)
Jump to navigation Jump to search

<section begin="desc" />Value of form field to longstring<section end="desc" />

$Web_Form_Parm_Lstr retrieves the value of an HTML form field as a longstring.

Syntax

<section begin="syntax" /> %STRING = $Web_Form_Parm_Lstr( name, occurrence ) <section end="syntax" />

$Web_Form_Parm_Lstr takes two arguments and returns a longstring or null for any error condition.

name The name of the form field, returned by $Web_Form_Name. Required argument if occurrence is not specified, otherwise optional.
occurrence The occurrence number of a form field, or the occurrence number of the form field matching name, if name is specified. This is an optional argument if name is specified; otherwise it is required.

Usage notes

  • $Web_Form_Parm_Lstr works much like $Web_Form_Parm, except for the following:
    • It can return more than 255 bytes of data into a longstring.
    • It causes request cancellation if the result would be truncated, either on assignment to a target STRING %variable, or as input to a STRING $function argument or subroutine parameter.
    • It does not have position and length arguments (arguments 3 and 4).

Examples

If you have an HTML form defined as follows:

<form method="POST" action="myUrl">
Foo:<input type="text" name="foo" size="20">
Bar:<input type="text" name="bar" size="20">
<input type="submit"> </form>

The following will retrieve the values of the Foo and Bar fields into longstrings called %foo and%bar.

%foo = $web_form_parm_lstr('FOO') %bar = $web_form_parm_lstr('BAR')


See also