[ Index ]

PHP Cross Reference of Unnamed Project

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 <jerome@mouneyrac.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 91 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:: (3 methods):
  __construct()
  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)).

__construct($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

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


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

return: string



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