From f9c4c50436ebc41f91ccaaf383128733d338876a Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sat, 16 Jul 2011 10:09:02 -0500 Subject: [PATCH] add Form::hidden and Form::text. --- system/form.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/system/form.php b/system/form.php index 1b6017a9..1b6bb1ff 100644 --- a/system/form.php +++ b/system/form.php @@ -110,6 +110,19 @@ public static function input($type, $name, $value = null, $attributes = array()) return ' $type, 'name' => $name, 'value' => $value, 'id' => static::id($name, $attributes)))).'>'.PHP_EOL; } + /** + * Create a HTML text input element. + * + * @param string $name + * @param string $value + * @param array $attributes + * @return string + */ + public static function text($name, $value = null, $attributes = array()) + { + return static::input('text', $name, $value, $attributes); + } + /** * Create a HTML password input element. * @@ -122,6 +135,19 @@ public static function password($name, $attributes = array()) return static::input('password', $name, null, $attributes); } + /** + * Create a HTML hidden input element. + * + * @param string $name + * @param string $value + * @param array $attributes + * @return string + */ + public static function hidden($name, $value = null, $attributes = array()) + { + return static::input('hidden', $name, $value, $attributes); + } + /** * Create a HTML search input element. *