<?
if ( $this -> params['label'] )
{
  $out .= '<div class="form_group">';
    $out .= '<label class="label">' . $this -> params['label'] . ':</label>';
    $out .= '<div class="input">';
}

      $out .= '<select ';

        if ( $this -> params['id'] )
          $out .= 'id="' . $this -> params['id'] . '" ';

        if ( $this -> params['class'] or $this -> params['label'] )
        {
          if ( $this -> params['label'] )
            $out .= 'class="' . $this -> params['class'] . ' form-control" ';
          else if ( $this -> params['class'] )
            $out .= 'class="' . $this -> params['class'] . '" ';
        }

        $out .= 'name="' . $this -> params['name'] . '" ';

        if ( $this -> params['style'] )
          $out .= 'style="' . $this -> params['style'] . '" ';

      $out .= '>';

      if ( $this -> params['empty'] )
        $out .= '<option value="">--- ' . mb_strtolower( $this -> params['label'], 'UTF-8' ) . ' ---</option>';

      if ( is_array( $this -> params['values'] ) ) foreach ( $this -> params['values'] as $key => $val )
      {
        $out .= '<option value="' . $key . '"'; if ( $key == $this -> params['value'] ) $out .= 'selected="selected"'; $out .='>' . $val . '</option>';
      }

      $out .= '</select>';

if ( $this -> params['label'] )
{
    $out .= '</div>';
  $out .= '</div>';
}

echo $out;