PageRenderTime 47ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/contentmanager/code/trunk/administrator/components/com_contentmanager/libraries/jxtended/form/fields/hidden.php

https://bitbucket.org/eddieajau/the-art-of-joomla-archive
PHP | 39 lines | 13 code | 5 blank | 21 comment | 0 complexity | 59122aa2624baba774f0321bf2a2fac8 MD5 | raw file
  1. <?php
  2. /**
  3. * @version $Id: hidden.php 160 2009-07-09 00:06:09Z eddieajau $
  4. * @package JXtended.Libraries
  5. * @subpackage Form
  6. * @copyright Copyright (C) 2008 - 2009 JXtended, LLC. All rights reserved.
  7. * @license GNU General Public License <http://www.gnu.org/copyleft/gpl.html>
  8. * @link http://jxtended.com
  9. */
  10. defined('JPATH_BASE') or die;
  11. jximport2('jxtended.form.field');
  12. /**
  13. * JXtended Form Field Type Class for a hidden input.
  14. *
  15. * @package JXtended.Libraries
  16. * @subpackage Form
  17. * @version 1.0
  18. */
  19. class JXFieldTypeHidden extends JXFieldType
  20. {
  21. /**
  22. * Field type
  23. *
  24. * @access protected
  25. * @var string
  26. */
  27. var $_type = 'Hidden';
  28. function fetchField($name, $value, &$node, $controlName)
  29. {
  30. $id = str_replace(']', '', str_replace('[', '_', $controlName.'_'.$name));
  31. $class = ($node->attributes('class') ? 'class="'.$node->attributes('class').'"' : 'class="text_area"');
  32. return '<input type="hidden" name="'.$controlName.'['.$name.']" id="'.$id.'" value="'.htmlspecialchars($value).'" '.$class.' />';
  33. }
  34. }