public function buildSelect($name = '', $multiple = false, $id = '', $class = '', $options = [], $selectedValue = '', $required = false, $attributes = [])
    {
        // Create select form input
        $id = $id ?: 'fs' . mt_rand();
        $element = new FormSelect($this->getHTMLDocument(), $this, $name, $id, $class, $multiple, $required, $attributes);

        // Insert options if any
        $element->addOptions($options, $selectedValue);

        // Return form element
        return $element;
    }
public function buildSelect($name = '', $multiple = false, $id = '', $class = '', $options = [], $selectedValue = '', $required = false, $attributes = [])
    {
        // Create select form input
        $id = $id ?: 'fs' . mt_rand();
        $element = new FormSelect($this->getHTMLDocument(), $this, $name, $id, $class, $multiple, $required, $attributes);

        // Insert options if any
        $element->addOptions($options, $selectedValue);

        // Return form element
        return $element;
    }
public function buildSelect ( $ name = '' , $ multiple = false , $ id = '' , $ class = '' , $ options = [ ] , $ selectedValue = '' , $ required = false , $ attributes = [ ] ) { // Create select form input $ id = $ id ? : 'fs' . mt_rand ( ) ; $ element = new FormSelect ( $ this -> getHTMLDocument ( ) , $ this , $ name , $ id , $ class , $ multiple , $ required , $ attributes ) ; // Insert options if any $ element -> addOptions ( $ options , $ selectedValue ) ; // Return form element return $ element ; }
Build an html form select element.

@param string $name          The select's name.
@param bool   $multiple      Option for multiple selection.
@param string $id            The select's id attribute.
@param string $class         The select's class attribute.
@param array  $options       An array of value -> title options for the select element.
@param string $selectedValue The select's selected value among options.
@param bool   $required      Sets the input as required for the form.
@param array  $attributes    A set of extra attributes

@return FormElement
@throws Exception
Build an html form select element .