$Web Form Parm: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
Line 5: Line 5:


<var>$Web_Form_Parm</var> retrieves the value of a field on a form.
<var>$Web_Form_Parm</var> retrieves the value of a field on a form.
<var>$Web_Form_Parm</var> takes four arguments, and it returns a string (or null for any error condition).
==Syntax==
==Syntax==
<p class="syntax"><section begin="syntax" /> %STRING = $Web_Form_Parm( fieldname, occurrence, start, len )
<p class="syntax"><section begin="syntax" /> %string = $Web_Form_Parm( fieldname, occurrence, start, len )
<section end="syntax" /></p>
<section end="syntax" /></p>


 
===Syntax terms===
<var>$Web_Form_Parm</var> takes four arguments, and it returns a string (or null for any error condition).
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>fieldname</th>
<tr><th>fieldname</th>
Line 22: Line 23:
</td></tr></table>
</td></tr></table>


 
==Examples==
 
This example places the value of each parameter on a form into a User Language %variable of the same name.
This example places the value of each parameter on a form into a User Language %variable of the same name.
<p class="code"> * Stash the form values in matching fields.
<p class="code">&#42; Stash the form values in matching fields.
   
   
%CUSTOMER_NAME = $Web_Form_Parm( 'CUSTOMER_NAME' )
%CUSTOMER_NAME = $Web_Form_Parm( 'CUSTOMER_NAME' )
%CUSTOMER_NUM = $Web_Form_Parm( 'CUSTOMER_NUM' )
%CUSTOMER_NUM = $Web_Form_Parm( 'CUSTOMER_NUM' )
%ORDER_NUM = $Web_Form_Parm( 'ORDER_NUM' )
%ORDER_NUM = $Web_Form_Parm( 'ORDER_NUM' )
%ORDER_DATE = $Web_Form_Parm( 'ORDER_DATE' )
%ORDER_DATE = $Web_Form_Parm( 'ORDER_DATE' )
%ORDER_ITEM = $Web_Form_Parm( 'ORDER_ITEM')
%ORDER_ITEM = $Web_Form_Parm( 'ORDER_ITEM')
%ORDER_ITEM2 = $Web_Form_Parm( 'ORDER_ITEM', 2)
%ORDER_ITEM2 = $Web_Form_Parm( 'ORDER_ITEM', 2)
</p>
</p>


 
==See also==
See also:
<ul>
<ul>



Revision as of 21:08, 12 June 2012

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


$Web_Form_Parm retrieves the value of a field on a form. $Web_Form_Parm takes four arguments, and it returns a string (or null for any error condition).

Syntax

<section begin="syntax" /> %string = $Web_Form_Parm( fieldname, occurrence, start, len ) <section end="syntax" />

Syntax terms

fieldname The name of the form field, returned by $Web_Form_Name. A required argument if occurrence is not specified, otherwise it is optional.
occurrence The occurrence number of a form field, or the occurrence number of the form field matching fieldname, if fieldname is specified. An optional argument if fieldname is specified, otherwise it is required.
start Starting position within the field. This is an optional argument which defaults to 1.
len Length to return. This is an optional argument, provided in case a form field exceeds 255 bytes. The length of a form field can be determined with $Web_Form_Len. The default is the length of the form field.

Examples

This example places the value of each parameter on a form into a User Language %variable of the same name.

* Stash the form values in matching fields. %CUSTOMER_NAME = $Web_Form_Parm( 'CUSTOMER_NAME' ) %CUSTOMER_NUM = $Web_Form_Parm( 'CUSTOMER_NUM' ) %ORDER_NUM = $Web_Form_Parm( 'ORDER_NUM' ) %ORDER_DATE = $Web_Form_Parm( 'ORDER_DATE' ) %ORDER_ITEM = $Web_Form_Parm( 'ORDER_ITEM') %ORDER_ITEM2 = $Web_Form_Parm( 'ORDER_ITEM', 2)

See also