Commit efb040c5 by Pedro Borges

Added support for <label> element

parent af24e8db
...@@ -72,6 +72,19 @@ class Form { ...@@ -72,6 +72,19 @@ class Form {
} }
/** /**
* Create a HTML label element.
*
* @param string $name
* @param string $value
* @param array $attributes
* @return string
*/
public static function label($name, $value, $attributes = array())
{
return '<label for="'.$name.'"'.HTML::attributes($attributes).'>'.HTML::entities($value).'</label>'.PHP_EOL;
}
/**
* Create a HTML text input element. * Create a HTML text input element.
* *
* @param string $name * @param string $name
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment