Index: topics/forms_api_reference.html =================================================================== RCS file: /cvs/drupal-contrib/contributions/docs/developer/topics/forms_api_reference.html,v retrieving revision 1.88 diff -u -p -r1.88 forms_api_reference.html --- topics/forms_api_reference.html 20 Sep 2008 00:07:19 -0000 1.88 +++ topics/forms_api_reference.html 1 Oct 2008 12:02:10 -0000 @@ -289,6 +289,21 @@ td { - + #input_format + - + - + - + - + - + - + - + - + - + X + X + - + + #maxlength - - @@ -1148,7 +1163,7 @@ td {

textarea

Description: Format a multiple-line text field.

-

Properties: #ahah, #attributes, #cols (default: 60), #default_value, #description, #post_render, #prefix, #pre_render, #required, #suffix, #title, #type. #rows (default: 5), #weight

+

Properties: #ahah, #attributes, #cols (default: 60), #default_value, #description, #input_format, #post_render, #prefix, #pre_render, #required, #suffix, #title, #type. #rows (default: 5), #weight

Usage example (forum.module):

<?php
@@ -1156,12 +1171,13 @@ td {   '#type'
=> 'textarea',
  '#title'
=> t('Body'),
  '#default_value'
=> $node->body,
+   '#input_format'
=> isset($node->format) ? $node->format : FILTER_FORMAT_DEFAULT),
  '#required'
=> TRUE
);
?>

textfield

Description: Format a single-line text field.

-

Properties: #ahah, #attributes, #autocomplete_path (default: FALSE), #default_value, #description, #field_prefix, #field_suffix, #maxlength (default: 128), #post_render, #prefix, #pre_render, #required, #size (default: 60), #suffix, #title, #type. #weight

+

Properties: #ahah, #attributes, #autocomplete_path (default: FALSE), #default_value, #description, #field_prefix, #field_suffix, #input_format, #maxlength (default: 128), #post_render, #prefix, #pre_render, #required, #size (default: 60), #suffix, #title, #type. #weight

Usage example (forum.module):

<?php
@@ -1560,6 +1576,21 @@ td { );
+

#input_format

+

Used by: textarea, textfield

+

Description: Specifies the input format used by default for the field. Drupal will automatically expand the element to a 'value' and a 'format' element later.

+

Values: A positive number.

+

Usage example (node.module):

+
+

<?php
+ $form
['body'] = array(
+   '#type'
=> 'textarea',
+   '#title'
=> check_plain($label),
+   '#default_value'
=> $node->body,
+   '#input_format'
=> isset($node->format) ? $node->format : FILTER_FORMAT_DEFAULT),
+   '#required'
=> TRUE,
);
?>

+
+

#markup

Used by: item, markup

Description: Used to set HTML that will be output on the form.