Core_Form::textarea
Creates a textarea form input.
echo Form::textarea( 'about' , $about );
|
string Core_Form::textarea( string $name [, string $body = empty , array $attributes = null , boolean $double_encode = bool false ] )
- uses
- HTML::attributes
- HTML::chars
参数列表
参数 |
类型 |
描述 |
默认值 |
$name |
string |
Textarea name |
|
$body |
string |
Textarea body |
empty |
$attributes |
array |
Html attributes |
null |
$double_encode |
boolean |
Encode existing HTML characters |
bool false |
返回值
File: ./core/classes/form.class.php
241 242 243 244 245 246 247 248 249 250 | public static function textarea( $name , $body = '' , array $attributes = null, $double_encode = false)
{
$attributes [ 'name' ] = $name ;
$attributes += array ( 'rows' => 10, 'cols' => 50);
return '<textarea' . HTML::attributes( $attributes ) . '>' . HTML::chars( $body , $double_encode ) . '</textarea>' ;
}
|