Source for file combo.php
Documentation is available at combo.php
* @package Joomla.Platform
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
* Form Field class for the Joomla Platform.
* Implements a combo box field.
* @package Joomla.Platform
protected $type =
'Combo';
* Method to get the field input markup for a combo box field.
* @return string The field input markup.
// Initialize some field attributes.
$attr .=
!empty($this->class) ?
' class=combobox"' .
$this->class .
'"' :
' class="combobox"';
$attr .=
$this->readonly ?
' readonly' :
'';
$attr .=
$this->disabled ?
' disabled' :
'';
$attr .=
!empty($this->size) ?
' size="' .
$this->size .
'"' :
'';
$attr .=
$this->required ?
' required aria-required="true"' :
'';
// Initialize JavaScript field attributes.
// Get the field options.
// Load the combobox behavior.
JHtml::_('behavior.combobox');
$html[] =
'<div class="combobox input-append">';
// Build the input for the combo box.
$html[] =
'<input type="text" name="' .
$this->name .
'" id="' .
$this->id .
'" value="'
$html[] =
'<div class="btn-group">';
$html[] =
'<button type="button" class="btn dropdown-toggle">';
$html[] =
' <span class="caret"></span>';
// Build the list for the combo box.
$html[] =
'<ul class="dropdown-menu">';
foreach ($options as $option)
$html[] =
'<li><a href="#">' .
$option->text .
'</a></li>';
$html[] =
'</div></div>';
Documentation generated on Tue, 19 Nov 2013 14:56:05 +0100 by phpDocumentor 1.4.3