Source for file range.php
Documentation is available at range.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.
* Provides a horizontal scroll bar to specify a value in a range.
* @package Joomla.Platform
* @link http://www.w3.org/TR/html-markup/input.text.html#input.text
protected $type =
'Range';
* Method to get the field input markup.
* @return string The field input markup.
// Initialize some field attributes.
$max =
!empty($this->max) ?
' max="' .
$this->max .
'"' :
'';
$min =
!empty($this->min) ?
' min="' .
$this->min .
'"' :
'';
$step =
!empty($this->step) ?
' step="' .
$this->step .
'"' :
'';
$class =
!empty($this->class) ?
' class="' .
$this->class .
'"' :
'';
$readonly =
$this->readonly ?
' readonly' :
'';
$disabled =
$this->disabled ?
' disabled' :
'';
$autofocus =
$this->autofocus ?
' autofocus' :
'';
$value = (float)
$this->value;
$value =
empty($value) ?
$this->min :
$value;
// Initialize JavaScript field attributes.
$onchange =
!empty($this->onchange) ?
' onchange="' .
$this->onchange .
'"' :
'';
// Including fallback code for HTML5 non supported browsers.
JHtml::_('script', 'system/html5fallback.js', false, true);
return '<input type="range" name="' .
$this->name .
'" id="' .
$this->id .
'"' .
' value="'
.
htmlspecialchars($value, ENT_COMPAT, 'UTF-8') .
'"' .
$class .
$disabled .
$readonly
.
$onchange .
$max .
$step .
$min .
$autofocus .
' />';
Documentation generated on Tue, 19 Nov 2013 15:11:34 +0100 by phpDocumentor 1.4.3