Skip to content

classes_lib_controls_form_select2.class

Daniel Spors edited this page Nov 14, 2024 · 3 revisions

Classes in file lib/controls/form/select2.class.php

class Select2

See https://select2.org/

Extends: Select » Control » Renderable

opt

Sets or gets an option if you specify a $value will set it and return $this. else will return the option value

Definition: public function opt($name, $value=null)

Returns: static|mixed If setting an option returns $this, else returns the option value

Parameters:

  • string $name option name

  • mixed $value option value or null

setAjax

Sets up AJAX loading of values.

Definition: public function setAjax($url)

Returns: static

Parameters:

  • string $url The data URL

setMultiple

De-/Activates the multi-select feature.

Definition: public function setMultiple($on=true, $sort_selection=true)

Returns: static

Parameters:

  • bool $on True=on, false=off

  • bool $sort_selection If true embedded sorting is on, else it will be deactivated

setValue

Sets the current value.

Definition: public function setValue($value)

Returns: static

Parameters:

  • mixed $value The value
Clone this wiki locally