[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/lib/pear/HTML/QuickForm/ -> autocomplete.php (summary)

(no description)

File Size: 258 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

HTML_QuickForm_autocomplete:: (9 methods):
  __construct()
  HTML_QuickForm_autocomplete()
  setOptions()
  toHtml()
  setSelectionRange()
  setCaretToPosition()
  replaceSelection()
  autocompleteMatch()
  autocomplete()


Class: HTML_QuickForm_autocomplete  - X-Ref

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);

__construct($elementName = null, $elementLabel = null, $options = null, $attributes = null)   X-Ref
Class constructor

param: string    $elementName    (optional)Input field name attribute
param: string    $elementLabel   (optional)Input field label in form
param: array     $options        (optional)Autocomplete options
param: mixed     $attributes     (optional)Either a typical HTML attribute string
return: void

HTML_QuickForm_autocomplete($elementName = null, $elementLabel = null, $options = null, $attributes = null)   X-Ref
Old syntax of class constructor. Deprecated in PHP7.


setOptions($options)   X-Ref
Sets the options for the autocomplete input text element

param: array    $options    Array of options for the autocomplete input text element
return: void

toHtml()   X-Ref
Returns Html for the autocomplete input text element

return: string

setSelectionRange(input, selectionStart, selectionEnd)   X-Ref
No description

setCaretToPosition(input, position)   X-Ref
No description

replaceSelection(input, replaceString)   X-Ref
No description

autocompleteMatch(text, values)   X-Ref
No description

autocomplete(textbox, event, values)   X-Ref
No description



Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1