Detailed Description

Represents information entered into a html form. It maps field names to their current selected value.

Public Member Functions

 FormData (Dictionary< string, string > fields)
 Creates a new form with the given field/value pairs. More...
 
bool Checked (string name)
 Provides a way of easily checking if a named checkbox is checked. More...
 
WWWForm ToUnityForm ()
 Converts this form data to a unity form. More...
 
string ToUrlString ()
 Converts this form data into a string suitable for use in post or gets. More...
 

Public Attributes

Element form
 The source form element. More...
 

Properties

string this[string name] [get]
 Gets the value of the named input element. More...
 

Private Attributes

Dictionary< string, string > RawFields
 The internal dictionary which holds the field/value pairs. More...
 

Constructor & Destructor Documentation

PowerUI.FormData.FormData ( Dictionary< string, string >  fields)
inline

Creates a new form with the given field/value pairs.

Parameters
fieldsA dictionary holding the field/value pairs from the form.

Member Function Documentation

bool PowerUI.FormData.Checked ( string  name)
inline

Provides a way of easily checking if a named checkbox is checked.

Parameters
nameThe field name of the checkbox.
Returns
True if the box is checked.
WWWForm PowerUI.FormData.ToUnityForm ( )
inline

Converts this form data to a unity form.

Returns
A Unity WWWForm suitable for web posting.
string PowerUI.FormData.ToUrlString ( )
inline

Converts this form data into a string suitable for use in post or gets.

Returns
A url friendly string, e.g. field1=value1&field2=value2...

Member Data Documentation

Element PowerUI.FormData.form

The source form element.

Dictionary<string,string> PowerUI.FormData.RawFields
private

The internal dictionary which holds the field/value pairs.

Property Documentation

string PowerUI.FormData.this[string name]
get

Gets the value of the named input element.

Parameters
nameThe field name.
Returns
The field value.