Text area

From PHP on Trax
Jump to: navigation, search

text_area( string $object_name, string $attribute_name, array $options = array() )

Description

Returns a textarea opening and closing tag set tailored for accessing a specified attribute on an object assigned to the template. Additional options on the input tag can be passed as a array with options.

$object_name a string which is the name of the instantiated model object in your controller that you want text_field to access for the "value".

$attribute_name a string which is the name of the column in the database table or object's attribute you want text_area to access for the "value".

$options is an array of key => value pairs of options for the input tag.

Returns an textarea tag converting the $options into html options on the tag.

Examples



Code: 
<?= text_area("post""body", array("cols" => 20"rows" => 40)) ?>
Output: 
<textarea cols="20" rows="40" id="post_body" name="post[body]"><?=$post->body?></textarea>

Code: 
<?= text_area("post""body", array("size" => "20x40")) ?>
Output: 
<textarea cols="20" rows="40" id="post_body" name="post[body]"><?=$post->body?></textarea>
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox