Difference between revisions of "$Web Form Name"
Jump to navigation
Jump to search
m (1 revision) |
|||
(8 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:$Web_Form_Name}} | {{DISPLAYTITLE:$Web_Form_Name}} | ||
− | <span class="pageSubtitle" | + | <span class="pageSubtitle">Name of form field</span> |
+ | <var>$Web_Form_Name</var> retrieves the name of a field on a form. | ||
− | |||
− | |||
==Syntax== | ==Syntax== | ||
− | <p class="syntax">< | + | <p class="syntax"><span class="term">%rc</span> = <span class="literal">$Web_Form_Name</span>(<span class="term"> field_number</span> ) |
− | < | + | </p> |
− | |||
<var>$Web_Form_Name</var> takes a single argument and returns a string or null if the number references a non-existing field. | <var>$Web_Form_Name</var> takes a single argument and returns a string or null if the number references a non-existing field. | ||
Line 14: | Line 12: | ||
The only parameter is the number of the form field for which the name is being requested. This parameter must be specified. | The only parameter is the number of the form field for which the name is being requested. This parameter must be specified. | ||
− | <var>$Web_Form_Name</var> is useful when writing generic server applications, when the server does not know what field name exists at a particular location in a POST request. | + | ==Usage notes== |
− | <p class="code"> | + | <ul> |
+ | <li><var>$Web_Form_Name</var> is useful when writing generic server applications, when the server does not know what field name exists at a particular location in a POST request. | ||
+ | </ul> | ||
+ | |||
+ | ==Example== | ||
+ | <p class="code">* Get the number of form fields. | ||
− | + | %x = $Web_Num_Form | |
− | + | * Load the field names into an array. | |
− | + | For %y From 1 TO %x | |
− | + | %field(%y) = $Web_Form_Name(%y) | |
− | + | 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_Parm]]</var> |
− | <li>[[$Web_Form_Parm]] | + | <li><var>[[$Web_Num_Form]]</var> |
− | <li>[[$Web_Num_Form]] | + | <li><var>[[$Web_Form_Parm_Lstr]]</var> |
+ | <li><var>[[$Web_Form_Parm_Binary]]</var> | ||
</ul> | </ul> | ||
[[Category:Janus Web Server $functions|$Web_Form_Name]] | [[Category:Janus Web Server $functions|$Web_Form_Name]] |
Latest revision as of 04:15, 20 February 2020
Name of form field
$Web_Form_Name retrieves the name of a field on a form.
Syntax
%rc = $Web_Form_Name( field_number )
$Web_Form_Name takes a single argument and returns a string or null if the number references a non-existing field.
The only parameter is the number of the form field for which the name is being requested. This parameter must be specified.
Usage notes
- $Web_Form_Name is useful when writing generic server applications, when the server does not know what field name exists at a particular location in a POST request.
Example
* Get the number of form fields. %x = $Web_Num_Form * Load the field names into an array. For %y From 1 TO %x %field(%y) = $Web_Form_Name(%y) End For