7
* This source file is subject to the new BSD license that is bundled
8
* with this package in the file LICENSE.txt.
9
* It is also available through the world-wide-web at this URL:
10
* http://framework.zend.com/license/new-bsd
11
* If you did not receive a copy of the license and are unable to
12
* obtain it through the world-wide-web, please send an email
13
* to license@zend.com so we can send you a copy immediately.
18
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
19
* @license http://framework.zend.com/license/new-bsd New BSD License
24
* Abstract class for extension
26
require_once 'Zend/View/Helper/FormElement.php';
30
* Helper to generate a "hidden" element
35
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
36
* @license http://framework.zend.com/license/new-bsd New BSD License
38
class Zend_View_Helper_FormHidden extends Zend_View_Helper_FormElement
41
* Generates a 'hidden' element.
45
* @param string|array $name If a string, the element name. If an
46
* array, all other parameters are ignored, and the array elements
47
* are extracted in place of added parameters.
48
* @param mixed $value The element value.
49
* @param array $attribs Attributes for the element tag.
50
* @return string The element XHTML.
52
public function formHidden($name, $value = null, array $attribs = null)
54
$info = $this->_getInfo($name, $value, $attribs);
55
extract($info); // name, value, attribs, options, listsep, disable
57
if (isset($attribs) && is_array($attribs)) {
60
$attribs = array('id' => $id);
63
return $this->_hidden($name, $value, $attribs);