GoodForm


Textarea

There are two ways of adding a textarea field to your form object:

textarea (string name [, string value])

Example:

$this->goodform->textarea('about_me', 'Lorem ipsum dolor sit amet.');

Will produce the following HTML:

<textarea name="about_me" >Lorem ipsum dolor sit amet.</textarea>
d

textarea (array attributes)

All attributes in this array will be converted to HTML element attributes. GoodForm will not check if these attributes are HTML valid. The only exceptions to this are the Special attributes that are not passed to the elements attribute string.

Example:

$attr = array(
	'name' 	=> 'about_me',
	'value'	=> 'Lorem ipsum dolor sit amet.',
	'rows'	=> 30,
	'cols'	=> 15
);

$this->goodform->textarea($attr);

Will produce the following HTML:

<textarea name="about_me" rows="30" cols="15">Lorem ipsum dolor sit amet.</textarea>