Hidden Field

hidden_field

Syntax:

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

Description:
Produces an input tag of the “hidden” 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->hidden_field("post", "opinion", array("size" => 20));

produces this PHP code:

<input type="hidden" id="post_opinion" name="post[opinion]" size="20" value="{post.opinion}" />

hidden_field_tag

Syntax:

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

Description:
Produces an input tag of the “hidden” 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-hiddenfield.txt · Last modified: 2008/03/06 21:49 by alake