Text Field

text_field

Syntax:

$form_helper->text_field( $object_name, [ $column_name ], [ $options ])

Description:
Returns an input tag of the “text” type tailored for accessing the attribute identified by $column_name on the object $object_name.
Additional options are to be passed as an array with $options. Options:

  • 'disabled' - If set to true, the user will not be able to use this input.
  • 'size' - The number of visible characters that will fit in the input.
  • 'maxlength' - The maximum number of characters that the browser will allow the user to enter.

Example:

$form_helper->text_field("post", "name_last", array("size" => 20));

produces this PHP code:

<input type="text" id="post_name_last" name="post[name_last]" size="20" value="{post.name_last}" />

text_field_tag

Syntax:

$form_helper_tag->text_field_tag( $name, [ $value ], [ $options ])

Description:
Produces an input tag of the “text” type. Processing of this input will have to be done in helper code or in the controller.
Options:

  • 'disabled' - If set to true, the user will not be able to use this input.
  • 'size' - The number of visible characters that will fit in the input.
  • 'maxlength' - The maximum number of characters that the browser will allow the user to enter.
 
helper-textfield.txt · Last modified: 2008/03/06 21:56 by alake