Moodle  2.2.1
http://www.collinsharper.com
HTML_QuickForm_autocomplete Class Reference
Inheritance diagram for HTML_QuickForm_autocomplete:
Collaboration diagram for HTML_QuickForm_autocomplete:

Public Member Functions

 HTML_QuickForm_autocomplete ($elementName=null, $elementLabel=null, $options=null, $attributes=null)
 setOptions ($options)
 toHtml ()

Data Fields

 $_options = array()
 $_js = ''

Detailed Description

Class to dynamically create an HTML input text element that at every keypressed javascript event, check in an array of options if there's a match and autocomplete the text in case of match.

Ex: $autocomplete =& $form->addElement('autocomplete', 'fruit', 'Favourite fruit:'); $options = array("Apple", "Orange", "Pear", "Strawberry"); $autocomplete->setOptions($options);

Author:
Matteo Di Giovinazzo <matteodg@infinito.it>

Definition at line 44 of file autocomplete.php.


Member Function Documentation

HTML_QuickForm_autocomplete ( elementName = null,
elementLabel = null,
options = null,
attributes = null 
)

Class constructor

Parameters:
string$elementName(optional)Input field name attribute
string$elementLabel(optional)Input field label in form
array$options(optional)Autocomplete options
mixed$attributes(optional)Either a typical HTML attribute string or an associative array. Date format is passed along the attributes. public
Returns:
void

Definition at line 78 of file autocomplete.php.

Here is the call graph for this function:

setOptions ( options)

Sets the options for the autocomplete input text element

Parameters:
array$optionsArray of options for the autocomplete input text element public
Returns:
void

Definition at line 98 of file autocomplete.php.

Here is the caller graph for this function:

toHtml ( )

Returns Html for the autocomplete input text element

public

Returns:
string

Reimplemented from HTML_QuickForm_input.

Definition at line 112 of file autocomplete.php.

Here is the call graph for this function:


Field Documentation

$_js = ''

Definition at line 62 of file autocomplete.php.

$_options = array()

Definition at line 54 of file autocomplete.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations