3 * template_lite {html_hidden} function plugin
7 * Purpose: Creates a hidden box
9 * - name = the name of the hidden field
10 * - value = the value of the hidden field
11 * Author: Paul Lockaby <paul@paullockaby.com>
13 function tpl_function_html_hidden($params, &$tpl)
15 require_once("shared.escape_chars.php");
20 foreach($params as $_key => $_value)
31 $extra .= ' ' . $_key . '="' . tpl_escape_chars($_value) . '"';
35 throw new Template_Exception("html_hidden: attribute '$_key' cannot be an array", $tpl);
40 if (!isset($name) ||
empty($name))
42 throw new Template_Exception("html_input: missing 'name' parameter", $tpl);
46 $toReturn = '<input type="hidden" name="' . tpl_escape_chars($name) . '" value="' . tpl_escape_chars($value) . '" ' . $extra . ' />';