FormElements Collection

The FormElements collection contains FormElement objects used to store all the HTML-form elements except for files.

The FormElement objects are retrieved by the Uploader.ParseRequest method.

Syntax

FormElements.property

 

Properties
Count Returns the number of FormElement objects in the collection.
Item Returns a reference to an element of the collection.

 

Remarks

Item is the default property of the collection, so FormElements.Item(index) and FormElements(index) are equivalents.

To iterate through the collection, you can use either For .. Each statement or any common loop statement such as For .. To.

 

Example

The following examples use different syntax to display names of all elements in a HTML-form. It's assumed the FormElements collection has been already retrieved and stored in objFormElements object.


For .. Each syntax
For Each objFormElement In objFormElements
  Response.Write objFormElement.Name
Next

 

For .. To syntax
For I = 1 To objFormElements.Count
  Response.Write objFormElement.Name
Next

 

See Also

FormFiles Collection | FormFile Object | Uploader Object

 


Send feedback to AfterLogic
Copyright © 2002-2022, AfterLogic Corporation. All rights reserved.