Source for file hidden.php

Documentation is available at hidden.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Platform
  4.  * @subpackage  Form
  5.  *
  6.  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
  7.  * @license     GNU General Public License version 2 or later; see LICENSE
  8.  */
  9.  
  10. defined('JPATH_PLATFORM'or die;
  11.  
  12. /**
  13.  * Form Field class for the Joomla Platform.
  14.  * Provides a hidden field
  15.  *
  16.  * @package     Joomla.Platform
  17.  * @subpackage  Form
  18.  * @link        http://www.w3.org/TR/html-markup/input.hidden.html#input.hidden
  19.  * @since       11.1
  20.  */
  21. class JFormFieldHidden extends JFormField
  22. {
  23.     /**
  24.      * The form field type.
  25.      *
  26.      * @var    string 
  27.      * @since  11.1
  28.      */
  29.     protected $type = 'Hidden';
  30.  
  31.     /**
  32.      * Method to get the field input markup.
  33.      *
  34.      * @return  string  The field input markup.
  35.      *
  36.      * @since   11.1
  37.      */
  38.     protected function getInput()
  39.     {
  40.         // Initialize some field attributes.
  41.         $class !empty($this->class' class="' $this->class . '"' '';
  42.         $disabled $this->disabled ? ' disabled' '';
  43.  
  44.         // Initialize JavaScript field attributes.
  45.         $onchange $this->onchange ? ' onchange="' $this->onchange . '"' '';
  46.  
  47.         return '<input type="hidden" name="' $this->name . '" id="' $this->id . '" value="'
  48.             . htmlspecialchars($this->valueENT_COMPAT'UTF-8''"' $class $disabled $onchange ' />';
  49.     }
  50. }

Documentation generated on Tue, 19 Nov 2013 15:04:41 +0100 by phpDocumentor 1.4.3