[ Index ]

PHP Cross Reference of moodle-2.8

title

Body

[close]

/lib/form/ -> searchableselector.php (summary)

searchable select type element Contains HTML class for a searchable select type element

Copyright: 2009 Jerome Mouneyrac <[email protected]>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 81 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 1 file
 lib/form/select.php

Defines 1 class

MoodleQuickForm_searchableselector:: (2 methods):
  MoodleQuickForm_searchableselector()
  toHtml()


Class: MoodleQuickForm_searchableselector  - X-Ref

searchable select type element

Display a select input with a search textfield input on the top
The search textfield is created by the javascript file searchselector.js
(so when javascript is not activated into the browser, the search field is not displayed)
If ever the select can be reset/unselect/blank/nooption, you will have to add an option "noselected"
and manage this special case when you get/set the form data (i.e. $mform->get_data()/$this->set_data($yourobject)).

MoodleQuickForm_searchableselector($elementName=null, $elementLabel=null, $options=null, $attributes=null)   X-Ref
Constructor

param: string $elementName Select name attribute
param: mixed $elementLabel Label(s) for the select
param: array $options additional options.
param: mixed $attributes Either a typical HTML attribute string or an associative array

toHtml()   X-Ref
Returns the select element in HTML

return: string



Generated: Fri Nov 28 20:29:05 2014 Cross-referenced by PHPXref 0.7.1