$Web Form Parm Line: Difference between revisions
m (1 revision) |
mNo edit summary |
||
Line 2: | Line 2: | ||
<span class="pageSubtitle"><section begin="desc" />Value of line in form field<section end="desc" /></span> | <span class="pageSubtitle"><section begin="desc" />Value of line in form field<section end="desc" /></span> | ||
<var>$Web_Form_Parm_Line</var> retrieves the value of a specific line in a form field. It is especially useful for ''textarea'' input fields. <var>$Web_Form_Line</var> is a short synonym for <var>$Web_Form_Parm_Line</var>. | |||
<var>$Web_Form_Parm_Line</var> takes three arguments and returns a string, or null for any error condition. | |||
==Syntax== | ==Syntax== | ||
<p class="syntax"><section begin="syntax" /> % | <p class="syntax"><section begin="syntax" />%string = $Web_Form_[Parm_]Line( fieldname, occurrence, line_num ) | ||
<section end="syntax" /></p> | <section end="syntax" /></p> | ||
===Syntax terms=== | |||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
<tr><th>fieldname</th> | <tr><th>fieldname</th> | ||
Line 21: | Line 20: | ||
</td></tr></table> | </td></tr></table> | ||
==Usage notes== | |||
<ul> | |||
<li>A line is considered to be a block of text that is terminated by either an ASCII carriage return (X'0D') or a carriage return followed by a line feed (X'0A'). This is what is ordinarily sent by a browser to mark the end of each line of a textarea input field. | |||
</ul> | |||
==Example== | |||
This example places each line of a textarea form field into an occurrence of a multiply occurring field. | This example places each line of a textarea form field into an occurrence of a multiply occurring field. | ||
<p class="code"> | <p class="code">FOR 1 RECORD IN ORDER_RECORD | ||
FOR %I FROM 1 TO $Web_Form_Parm_Num_Line('COMMENTS') | |||
%COMMENT = $Web_Form_Parm_Line('COMMENTS', , %I) | |||
ADD COMMENT = %COMMENT | |||
END FOR | |||
END FOR | |||
</p> | </p> | ||
==See also== | |||
See also | |||
<ul> | <ul> | ||
<li><var>[[$Web_Form_Parm_Len]]</var> | |||
<li>[[$Web_Form_Parm_Len]] | <li><var>[[$Web_Form_Name]]</var> | ||
<li>[[$Web_Form_Name]] | <li><var>[[$Web_Num_Form]]</var> | ||
<li>[[$Web_Num_Form]] | <li><var>[[$Web_Form_Parm_Num_Line]]</var> | ||
<li>[[$Web_Form_Parm_Num_Line]] | |||
</ul> | </ul> | ||
[[Category:Janus Web Server $functions|$Web_Form_Parm_Line]] | [[Category:Janus Web Server $functions|$Web_Form_Parm_Line]] |
Revision as of 21:59, 6 June 2012
<section begin="desc" />Value of line in form field<section end="desc" />
$Web_Form_Parm_Line retrieves the value of a specific line in a form field. It is especially useful for textarea input fields. $Web_Form_Line is a short synonym for $Web_Form_Parm_Line.
$Web_Form_Parm_Line takes three arguments and returns a string, or null for any error condition.
Syntax
<section begin="syntax" />%string = $Web_Form_[Parm_]Line( fieldname, occurrence, line_num ) <section end="syntax" />
Syntax terms
fieldname | The name of the form field, returned by $Web_Form_Name. Required argument if occurrence not specified, otherwise optional. |
---|---|
occurrence | The occurrence number of a form field, or the occurrence number of the form field matching 'fieldname', if fieldname is specified. Optional argument if fieldname is specified, otherwise it is required. |
line_num | Line number in the form field for which data is to be returned. This is an optional argument and defaults to 1. |
Usage notes
- A line is considered to be a block of text that is terminated by either an ASCII carriage return (X'0D') or a carriage return followed by a line feed (X'0A'). This is what is ordinarily sent by a browser to mark the end of each line of a textarea input field.
Example
This example places each line of a textarea form field into an occurrence of a multiply occurring field.
FOR 1 RECORD IN ORDER_RECORD FOR %I FROM 1 TO $Web_Form_Parm_Num_Line('COMMENTS') %COMMENT = $Web_Form_Parm_Line('COMMENTS', , %I) ADD COMMENT = %COMMENT END FOR END FOR