FreenetIS
 All Classes Namespaces Functions Variables Pages
Static Public Member Functions | List of all members
form Class Reference

Static Public Member Functions

static open ($action= '', $attr=array(), $hidden=NULL)
 Generates an opening HTML form tag.
static open_multipart ($action, $attr=array(), $hidden=array())
 Generates an opening HTML form tag that can be used for uploading files.
static open_fieldset ($data=NULL, $extra= '')
 Generates a fieldset opening tag.
static close_fieldset ()
 Generates a fieldset closing tag.
static legend ($text= '', $data=NULL, $extra= '')
 Generates a legend tag for use with a fieldset.
static hidden ($data, $value= '', $extra= '')
 Generates hidden form fields.
static input ($data, $value= '', $extra= '')
 Creates an HTML form input tag.
static password ($data, $value= '', $extra= '')
 Creates a HTML form password input tag.
static upload ($data, $value= '', $extra= '')
 Creates an HTML form upload input tag.
static textarea ($data, $value= '', $extra= '')
 Creates an HTML form textarea tag.
static dropdown ($data, $options=array(), $selected=array(), $extra= '')
 Creates an HTML form select tag, or "dropdown menu".
static checkbox ($data, $value= '', $checked=FALSE, $extra= '')
 Creates an HTML form checkbox input tag.
static radio ($data= '', $value= '', $checked=FALSE, $extra= '')
 Creates an HTML form radio input tag.
static submit ($data= '', $value= '', $extra= '')
 Creates an HTML form submit input tag.
static imagebutton ($data= '', $src= '', $extra= '')
 Creates an HTML form imagebutton input tag.
static button ($data= '', $value= '', $extra= '')
 Creates an HTML form button input tag.
static close ($extra= '')
 Closes an open form tag.
static label ($data= '', $text= '', $extra= '')
 Creates an HTML form label tag.
static attributes ($attr)
 Sorts a key/value array of HTML attributes, putting form attributes first, and returns an attribute string.
static create_hiddens (&$array, $input, $prefix)
 Creates hidden input names and values from input array.

Member Function Documentation

static form::attributes (   $attr)
static

Sorts a key/value array of HTML attributes, putting form attributes first, and returns an attribute string.

Parameters
arrayHTML attributes array
Returns
string
static form::button (   $data = '',
  $value = '',
  $extra = '' 
)
static

Creates an HTML form button input tag.

Parameters
string|arrayinput name or an array of HTML attributes
stringinput value, when using a name
stringa string to be attached to the end of the attributes
Returns
string
static form::checkbox (   $data,
  $value = '',
  $checked = FALSE,
  $extra = '' 
)
static

Creates an HTML form checkbox input tag.

Parameters
string|arrayinput name or an array of HTML attributes
stringinput value, when using a name
booleanmake the checkbox checked by default
stringa string to be attached to the end of the attributes
Returns
string
static form::close (   $extra = '')
static

Closes an open form tag.

Parameters
stringstring to be attached after the closing tag
Returns
string
static form::close_fieldset ( )
static

Generates a fieldset closing tag.

Returns
string
static form::create_hiddens ( $array,
  $input,
  $prefix 
)
static

Creates hidden input names and values from input array.

Author
Michal Kliment
Parameters
type$array
type$input
type$prefix
static form::dropdown (   $data,
  $options = array(),
  $selected = array(),
  $extra = '' 
)
static

Creates an HTML form select tag, or "dropdown menu".

Parameters
string|arrayinput name or an array of HTML attributes
arrayselect options, when using a name
stringoption key that should be selected by default
stringa string to be attached to the end of the attributes
Returns
string
static form::hidden (   $data,
  $value = '',
  $extra = '' 
)
static

Generates hidden form fields.

You can pass a simple key/value string or an associative array with multiple values.

Parameters
string|arrayinput name (string) or key/value pairs (array)
stringinput value, if using an input name
Returns
string
static form::imagebutton (   $data = '',
  $src = '',
  $extra = '' 
)
static

Creates an HTML form imagebutton input tag.

Parameters
string|arrayinput name or an array of HTML attributes
stringsource of image
stringa string to be attached to the end of the attributes
Returns
string
static form::input (   $data,
  $value = '',
  $extra = '' 
)
static

Creates an HTML form input tag.

Defaults to a text type.

Parameters
string|arrayinput name or an array of HTML attributes
stringinput value, when using a name
stringa string to be attached to the end of the attributes
Returns
string
static form::label (   $data = '',
  $text = '',
  $extra = '' 
)
static

Creates an HTML form label tag.

Parameters
string|arraylabel "for" name or an array of HTML attributes
stringlabel text or HTML
stringa string to be attached to the end of the attributes
Returns
string
static form::legend (   $text = '',
  $data = NULL,
  $extra = '' 
)
static

Generates a legend tag for use with a fieldset.

Parameters
stringlegend text
arrayHTML attributes
stringa string to be attached to the end of the attributes
Returns
string
static form::open (   $action = '',
  $attr = array(),
  $hidden = NULL 
)
static

Generates an opening HTML form tag.

Parameters
stringform action attribute
arrayextra attributes
arrayhidden fields to be created immediately after the form tag
Returns
string
static form::open_fieldset (   $data = NULL,
  $extra = '' 
)
static

Generates a fieldset opening tag.

Parameters
arrayhtml attributes
stringa string to be attached to the end of the attributes
Returns
string
static form::open_multipart (   $action,
  $attr = array(),
  $hidden = array() 
)
static

Generates an opening HTML form tag that can be used for uploading files.

Parameters
stringform action attribute
arrayextra attributes
arrayhidden fields to be created immediately after the form tag
Returns
string
static form::password (   $data,
  $value = '',
  $extra = '' 
)
static

Creates a HTML form password input tag.

Parameters
string|arrayinput name or an array of HTML attributes
stringinput value, when using a name
stringa string to be attached to the end of the attributes
Returns
string
static form::radio (   $data = '',
  $value = '',
  $checked = FALSE,
  $extra = '' 
)
static

Creates an HTML form radio input tag.

Parameters
string|arrayinput name or an array of HTML attributes
stringinput value, when using a name
booleanmake the radio selected by default
stringa string to be attached to the end of the attributes
Returns
string
static form::submit (   $data = '',
  $value = '',
  $extra = '' 
)
static

Creates an HTML form submit input tag.

Parameters
string|arrayinput name or an array of HTML attributes
stringinput value, when using a name
stringa string to be attached to the end of the attributes
Returns
string
static form::textarea (   $data,
  $value = '',
  $extra = '' 
)
static

Creates an HTML form textarea tag.

Parameters
string|arrayinput name or an array of HTML attributes
stringinput value, when using a name
stringa string to be attached to the end of the attributes
Returns
string
static form::upload (   $data,
  $value = '',
  $extra = '' 
)
static

Creates an HTML form upload input tag.

Parameters
string|arrayinput name or an array of HTML attributes
stringinput value, when using a name
stringa string to be attached to the end of the attributes
Returns
string

The documentation for this class was generated from the following file: