Try OpenEdge Now
skip to main content
Developing WebSpeed Applications
SpeedScript : WebSpeed API functions : Passing information between Web requests : Hidden form fields
 
Hidden form fields
Hidden fields provide a virtually inexhaustible means of passing information between Web requests. Based on user input from a form, you can return field values as hidden fields for the next Web request, thus maintaining a running record of data from prior requests that you pass from Web object to Web object and from agent to agent.
The following table lists the API functions that support hidden field construction. These functions construct complete HTML definitions for hidden fields in a form.
Table 6. Hidden field API functions
Function
Return type
Description
hidden-field
CHARACTER
Returns a string containing an HTML hidden form field with HTML special characters encoded. Parameters include the name and value of the field.
hidden-field-list
CHARACTER
Formats and returns a list of hidden fields delimited by newline characters. Parameters include a list of field names retrievable from the current request by the get-value API function.
See install-path/src/web/method/cgiutils.i for definitions for these functions.
For most applications, hidden-field-list is the main API function for constructing hidden fields, because you can define one or more hidden fields with it. To construct a list of hidden fields, use the set-user-field function to define the name/value pairs for each hidden field. Then call hidden-field-list to construct the hidden fields from the user field list.
For reading individual hidden fields, use the get-value API function. For more information, see General information exchange.