select options, generated dropdown combobox options control select dynamic database sql query tree hierarchy select
select
A single select like this:
or a multiple select like this (use the mouse button to select a range by dragging, or use the Control key while clicking on some values to select/deselect values that are not in a range):
- Live examples:
- Definition:
single select
<?php $config = Array( 'id' => Array( 'type' => 'select', 'displayname' => 'This is a static select', 'values' => Array( 0 => 'choose nothing', 1 => 'value 1', 2 => 'value 2' ), 'value' => '0', 'html' => 'CLASS="inputfieldstyle"' ) ); ?>multiple select
<?php $config = Array( 'id[]' => Array( 'type' => 'select', 'displayname' => 'This is a static multiple select', 'values' => Array( 0 => 'choose nothing', 1 => 'value 1', 2 => 'value 2' ), 'html' => 'multiple="multiple"', // an XHTML compatible way of the multiple parameter 'value' => '0' | Array( 1,2 ) ) ); ?> - Possible validators:
- 'required'
- 'custom'
