Select
form
Select value from predefined options
form
Select value from predefined options
Example | |
HTML code | <SELECT class="select" name="select"> <option value="1">One</option> <option value="2" selected>Two</option> <option value="3">Three</option> </SELECT> |
Type | atom |
Group | form |
Todo | Oletuksena 100%? (kuten input, textarea) Doing eUiSelect käyttöönotto (Option icon, color, description. Only icon. Options from global/js/ajax) |
Wrapper to use element through PHP
Extends | eUiElementInput |
Render | html |
Create arguments | type |
Code example | Basic$this->get('ui', 'select', Array( 'name' => 'name', 'value' => $value, 'options' => Array( '1' => 'One', '2' => 'Two' ) )); Options as assoc array$this->get('ui', 'select', Array( 'name' => 'name', 'value' => $value, 'options' => Array( Array( 'value' => '1', 'title' => 'One' ), Array( 'value' => '2', 'title' => 'Two' ) ) )); All parameters$this->get('ui', 'select', Array( 'id' => 'id' , // default: name 'name' => 'name', 'value' => $value, 'default' => '2', // Set as value, if empty 'tooltip' => 'Tooltip text', 'placeholder' => 'Placeholder text', 'width' => 200, 'onchange' => 'runMeOnChange()', 'allownull' => 'false', // Do not allow select to be empty 'options' => Array( Array( 'value' => '1', 'title' => 'One', 'description' => 'One', 'icon' => 'warning', 'color' => 'red' ) ) )); |
Elements Css style
justified | |
success |