NAME

Serengeti::Backend::Native::HTMLFormElement - Deals with properties and methods of forms

INTERFACE

METHODS

get_property ($element : HTML::Element, $property : scalar) : scalar

Returns the property value from the element when requested from JavaScript.

Object properties:

elements

Scans the element for any descendants which are input-, textarea- or select- elements and wraps these in a HTMLCollection element.

length

Returns the number of inputs that are descendants of the form.

name

Returns the name of the form.

enctype

Returns the encodning type of the form when sent - normally this is application/x-www-form-urlencoded but if the form contains a file-input the type will be mulitpart/form-data.

action

Returns the URL which the request will be made to when submitting.

target

Returns the name of the frame which will be used to do the submit in.

method

Returns the method the submit will be done in. When actually submitting the only values permitted are POST and GET. If it's neither a GET request will be assumed.

submit

Returns a function that can be called to perform the actual submit. The function optionally takes a object-instance whose key/value paris can override values set on the forms inputs.

reset

Returns a function which resets the form to its initial state.

submit ( $element : HTML::Element : $override : hash ) : Serengeti::Backend::Native::Document

Gathers the values of the inputs in the form and performs the request. Returns a new document instance corresponding to the newly requested page.