|
Moodle
2.2.1
http://www.collinsharper.com
|


Public Member Functions | |
| HTML_QuickForm_autocomplete ($elementName=null, $elementLabel=null, $options=null, $attributes=null) | |
| setOptions ($options) | |
| toHtml () | |
Data Fields | |
| $_options = array() | |
| $_js = '' | |
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);
Definition at line 44 of file autocomplete.php.
| HTML_QuickForm_autocomplete | ( | $ | elementName = null, |
| $ | elementLabel = null, |
||
| $ | options = null, |
||
| $ | attributes = null |
||
| ) |
Class constructor
| 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 |
Definition at line 78 of file autocomplete.php.

| setOptions | ( | $ | options | ) |
Sets the options for the autocomplete input text element
| array | $options | Array of options for the autocomplete input text element public |
Definition at line 98 of file autocomplete.php.

| toHtml | ( | ) |
Returns Html for the autocomplete input text element
public
Reimplemented from HTML_QuickForm_input.
Definition at line 112 of file autocomplete.php.

| $_js = '' |
Definition at line 62 of file autocomplete.php.
| $_options = array() |
Definition at line 54 of file autocomplete.php.