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-2009 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: FormHidden.php 16541 2009-07-07 06:59:03Z bkarwin $
25 * Abstract class for extension
27 require_once 'Zend/View/Helper/FormElement.php';
31 * Helper to generate a "hidden" element
36 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
37 * @license http://framework.zend.com/license/new-bsd New BSD License
39 class Zend_View_Helper_FormHidden
extends Zend_View_Helper_FormElement
42 * Generates a 'hidden' element.
46 * @param string|array $name If a string, the element name. If an
47 * array, all other parameters are ignored, and the array elements
48 * are extracted in place of added parameters.
49 * @param mixed $value The element value.
50 * @param array $attribs Attributes for the element tag.
51 * @return string The element XHTML.
53 public function formHidden($name, $value = null, array $attribs = null)
55 $info = $this->_getInfo($name, $value, $attribs);
56 extract($info); // name, value, attribs, options, listsep, disable
58 if (isset($attribs) && is_array($attribs)) {
61 $attribs = array('id' => $id);
64 return $this->_hidden($name, $value, $attribs);