diff --git a/FormBuilder.php b/FormBuilder.php index d7f2f7b..8fe11f9 100644 --- a/FormBuilder.php +++ b/FormBuilder.php @@ -538,6 +538,38 @@ class FormBuilder { return $this->getValueAttribute($name) == $value; } + /** + * Create a HTML reset input element. + * + * @param string $value + * @param array $attributes + * @return string + */ + public static function reset($value, $attributes = array()) + { + return $this->input('reset', null, $value, $attributes); + } + + /** + * Create a HTML image input element. + * + * + * // Create an image input element + * echo Form::image('img/submit.png'); + * + * + * @param string $url + * @param string $name + * @param array $attributes + * @return string + */ + public static function image($url, $name = null, $attributes = array()) + { + $attributes['src'] = URL::asset($url); + + return $this->input('image', $name, null, $attributes); + } + /** * Create a submit button element. *