Select

Skip to end of metadata
Go to start of metadata

Configuration

Name
Type
Description
store
array
Key/Value pairs for the available options.
reload
bool
Set true to reload the page in editmode after selecting an item

Additionally you can use every configuration property of Ext.form.ComboBox to customize the select widget in editmode.

Accessable Properties

Name
Type
Description
text
string
Value of the select, this is useful to get the value even in editmode

Example

// To preselect "option2" in editmode
<?
if($this->editmode){
    if($this->select("mySelect")->isEmpty()){
	$this->select("mySelect")->setDataFromResource("option2");
    }
}
?> 

// Basic usage
<?php echo $this->select("mySelect",array(
    "store" => array(
        array("option1", "Option One"),
        array("option2", "Option Two"),
        array("option3", "Option Three")
    )
)); ?>

// Advanced usage
<?php echo $this->select("blocktype",array(
        "store" => array(
        array("wysiwyg", "WYSIWYG"),
        array("contentimages", "WYSIWYG with images"),
        array("video", "Video")
    ),
    "reload" => true
)); ?>
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.